It would be nice if hlsearch is intelligent to recognize users actions so it will not be turned on for certain commands such as search and substitute.
That's a feature. And there are already plugins that do this kind of stuff.
https://github.com/junegunn/vim-oblique
https://github.com/osyo-manga/vim-over
Oh cool, thx a lot
@pencilcheck if you want an easy way to clear the highlighting, you can do this in your vim config:
nnoremap <silent> <C-l> :nohlsearch<CR><C-l>
That will make it so that not only CTRL-L will redraw the screen, but it will drop the search highlighting. I have something similar in my vim config.
Most helpful comment
@pencilcheck if you want an easy way to clear the highlighting, you can do this in your vim config:
That will make it so that not only CTRL-L will redraw the screen, but it will drop the search highlighting. I have something similar in my vim config.