in reply to Substitute Question

Methinks your spec is incomplete. What if the new word is of a different length than the old word? I see that you wrote code that acts on the longer of the two, but how did you determine that was what the poster wanted to happen?

Replies are listed 'Best First'.
Re: Re: Substitute Question
by RiotTown (Scribe) on May 30, 2001 at 01:02 UTC
    Sorry for the incompleteness, but that is how it was posted to the vim mailing list. I took it upon myself (and forgot to mention it) to simply append/disregard characters in cases where the old/new lengths do not match. Not really sure if that is what the poster wanted, but for the purposes of this lets assume it is acceptable. Also, where is the proper place to put 'golf' type questions?