How do you make vim unhighlight what you searched for?
I search for "nurple" in a file. I found it, great. But now, every occurrence of "nurple" is rendered in sick black on yellow. Forever.
Forever, that is, until I search for something I know won't be found, such as "asdhfalsdflajdflakjdf" simply so it clears the previous search highlighting.
Can't I just hit a magic key to kill the highlights when I'm done searching?
把它放在你的.vimrc里
" <Ctrl-l> redraws the screen and removes any search highlighting.
nnoremap <silent> <C-l> :nohl<CR><C-l>
:noh
(nohighlight的简称)将会诀窍。
/lkjasdf
一直快于:noh
我。
下一篇: 你如何让vim不重视你搜索的内容?