请允许我指出,我的职责是:
function! s:Test()
let search = d+
let @/ = search
return "normal n"
endfunction
Why doesn t this highlight the search matches?
Only after I do :set hls
in the commandline it does highlighting.
It does also highlighting when I push the n
key on my keyboard.
If I put the same line (:set hls
) in the function it doesn t work.
BTW highlighting is enabled in my VIM.
It highlights fine if I use the commandline.