On Tue, 25 Apr 2006, Salman Khilji wrote:

[snip]
What I am looking for is that when I hit the 'n' key,
VIM should move the cursor to the next match AND
highlight it as well using, for example, the 'Search',
or 'IncSearch', or the 'Todo' highlight group.  As
soon as I hit the 'n' key again, the previous
highlight should disappear and the next one should get
highlighted.
[snip]


With these assumptions

  set nohlsearch nocompatible

you can try these mappings:

  cmap <C-n> <CR>/<Up>
  cmap <C-p> <CR>?<Up>

Hit Ctrl-n/p to move on to the next/previous search, while you have
incsearch highlight on.

HTH :)
--
Gerald

Reply via email to