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?
试试:noh
命令。
vi/vim notes
I use
/pleasedisablehighlightthanks
command. Or just
/qewrufhiqwe
But you should be carefult not to mix this with the following command!
/qewrufhiqew
:noremap <silent> <c-l> :nohls<cr><c-l>
这将重新绘制屏幕并使用Control-L清除任何搜索词,方便:)比达到F键更容易。
链接地址: http://www.djcxy.com/p/49374.html下一篇: 如何摆脱Vim中的搜索亮点