Clear the last search highlighting in Vim
After you do a search in vim you get all the occurrences highlighted. When you don't want the highlight anymore, most people (me included) usually do another search for something gibberish that can't be found.
Today I just discovered that there is an easier way to do that. You just need to add the following line to your .vimrc
and it's done!
nnoremap <esc> :noh<return><esc>
By putting that in your .vimrc
you can then just press <esc>
after you search to clear the highlighting from the previous search.
Written by Glauco Vinicius
Related protips
1 Response
I just do /;slkdfj or whatever. no keymapping and instantaneous.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Vim
Authors
Related Tags
#vim
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#