Monday, July 19, 2010

Re: Default search changed by search and replace

On 07/19/10 11:16, Mark Butler wrote:
> The behavior of the 'n' command appears to have recently
> changed. It used to always repeat the last _search_. Now it
> appears to repeat the search implied by the last _search and
> replace_, when there has been an intervening search and
> replace since the last search.

Um, this has been vi behavior since the beginning, AFAICT...I've
got an older version of nvi as well as vim6.2 (yes, I can hear
Tony complaining already ;-) and they both behave the same way:
search for X, do a :%s/Y/Z/ and then use n/N to search for the
next instance and it will attempt to search for Y (which may or
may not return results depending on whether you include the "g"
flag or if you include the search in the replacement) instead of
X. Same happens in "ed" for that matter (though instead of using
n/N, you use "/" or "?" to search and just hit <enter> to accept
the default).

-tim


--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: