Hello,

I use my own mapping of  'n' which  invokes ":normal! n" inside.
I noticed that my n does not turn on 'hls' automatically
when 'hls' is disabled by 'h' in viminfo. This is strange because
my map for n does invoke ':normal! n', which itself
would turn hls on. Here is test case:
   vim --noplugin -u yy.vim yy.vim
   /.<cr>
   ZZ
   vim --noplugin -u yy.vim yy.vim
   gg
   n
   ZZ
- this works, turns on 'hls'
   vim --noplugin -u xx.vim xx.vim
   " assume search pattern "." comes from viminfo
   n
- does not turn on 'hls'

Yakov
--------------- xx.vim -----------------
set nocp
:set viminfo='20,<50,s10,:20,h
:set hls
function! MySearch_n()
   :silent! exe "normal! n"
endfu
nmap <silent>n :call MySearch_n()<cr>
--------------------------------------------------
2.
------------------ yy.vim -------------------
set nocp
:set viminfo='20,<50,s10,:20,h
:set hls
nmap <silent>n :silent! exe "normal! n"<cr>
--------------------------------------------

Reply via email to