本文介绍了Vim 清除上次搜索突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 Vim 中进行搜索后,我将所有出现的事件都突出显示.我怎样才能禁用它?我现在再次搜索一些找不到的乱码.
After doing a search in Vim, I get all the occurrences highlighted. How can I disable that? I now do another search for something gibberish that can't be found.
有没有办法暂时禁用突出显示,然后在需要时再次启用它?
Is there a way to just temporarily disable the highlight and then re-enable it when needed again?
推荐答案
关闭高亮直到下一次搜索:
To turn off highlighting until the next search:
:noh
或者完全关闭突出显示:
Or turn off highlighting completely:
set nohlsearch
或者,切换它:
set hlsearch!
nnoremap <F3> :set hlsearch!<CR>
这篇关于Vim 清除上次搜索突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!