Thursday, May 27, 2010

RE: How to avoid returning to the beginning when I search for one string

robert song wrote:
> I search for one string in vim with "n", but if all strings
> is searched, it will return to the beginning of the file.

See 'nowrapscan' at:
http://vim.wikia.com/wiki/Searching

However, the better answer is to get used to it because it is
very useful in practice! What you need to do is have a prominent
message when wrap around occurs so you don't wonder when it has
happened. For example:

:hi WarningMsg ctermfg=15 ctermbg=12 guifg=White guibg=Red gui=NONE

John

--
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:

Post a Comment