How to get rid of search highlight in Vim
I have :set hlsearch
as default value.
When I search for something, search terms get highlighted. However many times I want to get rid of the highlight, so I do :set nohlsearch
. In this way I get rid of highlights for the time being.
However if I do a new search, then search terms are not highlighted.
I would like to hit ESC + ESC to get rid of highlights and then set back :set hlsearch
.
Any suggestions?
Try the :noh
command.
vi/vim notes
I use
/pleasedisablehighlightthanks
command. Or just
/qewrufhiqwe
But you should be carefult not to mix this with the following command!
/qewrufhiqew