Thursday, May 27, 2010

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

John,
thank you very much.
with nowrapscan set, I can go to the top and scan for all strings.

Best Regards,
robert


On 5/28/10, John Beckett <johnb.beckett@gmail.com> wrote:
> 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
>

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