Is it possible to not trigger my normal search highlighting when using search as a movement?

Solution 1:

These naive mappings seem to help.

  • normal search

    Turn highlighting on before doing the search:

    nnoremap / :set hls<CR>/
    
  • motion search

    Turn highlighting off before doing the search:

    nnoremap v/ :set nohls<CR>v/
    nnoremap d/ :set nohls<CR>d/
    nnoremap y/ :set nohls<CR>y/
    nnoremap c/ :set nohls<CR>c/
    

Note that you'd need to setup similar mapping for ?.

Solution 2:

To permanently disable highlighting of searches:

:set nohlsearch
(or)
:set nohls

But probably you want to keep highlight on. On the other hand, if want to temporary get rid of the highlight, type:

:nohlsearch
(or)
:noh

It will stop highlighting the current search, until you search again.

Even though it's not the perfect answer for you, this is a nice workaround, and this is what I use.