When using VIM's incremental search option I usually search and after I got to the first result (it will be highlighted) I use the /
key to jump to the next result.
But:
/
makes VIM jump to the next result but it won't highlight it.I am wondering if there is a more efficient way to jump between the results using incremental search and get them highlighted.
Press Esc to cancel or press Enter to perform the search. Then press n to search forwards for the next occurrence, or N to search backwards. Type ggn to jump to the first match, or GN to jump to the last.
incsearch. vim is a Vim plugin which improve incremental searching. It provides functionality to highlight all matches while searching, to move cursor to next/previous match while searching and so on.
The customary key for jumping to the next search result is 'n'.
I'm not entirely sure what you mean about highlighting - all search results should be highlighted if hlsearch is set, and for me it makes no difference if I go to the next result with 'n' or with '/'.
With Ctrl-t
and Ctrl-g
you can move between matches without leaving the search mode
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With