Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to shut down highlight after using find instruction in vim

Tags:

vim

highlighting is become annoying after I found the target word by using /string in vim , could any body tell me what is the quickest way to shutdown highlighting ? thanks

like image 285
Yank Avatar asked Oct 25 '12 03:10

Yank


1 Answers

The simplest way is to enter the :noh command.

Additionally, you can add this line to your .vimrc to map that command to the Enter key, so you can simply press Enter after searching to clear highlight:

:nnoremap <CR> :noh<CR><CR>
  • vim clear last search highlighting
  • A Vim and ViEmu mapping you really can’t miss - never type :noh again!
like image 160
Jonathon Reinhart Avatar answered Oct 13 '22 00:10

Jonathon Reinhart