Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to turn off Vim search highlighting

Tags:

vim

i have a pre-configured .vimrc file under ~/ ,after searching a term through '/' key,all items matched are highlighted,but after i find the need position and hit enter,the highlighted terms are still highlited... it's very disappointing since when i issue --c/"--,the screen is mashed with highlightings.which setting controls search highlighting facility?thanks!

like image 649
Pwn Avatar asked Dec 06 '22 06:12

Pwn


1 Answers

You can issue :nohl to turn off highlighting until the next search. I would recommend mapping that to a key.

:map <F4> :nohl<CR>

If you want to turn off highlighting forever, use :se nohlsearch in your .vimrc

like image 110
soulmerge Avatar answered Dec 07 '22 20:12

soulmerge