Vim清除最后一个搜索突出显示 [英] Vim clear last search highlighting

查看:112
本文介绍了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

或完全关闭突出显示:

set nohlsearch

或者,对其进行切换:

set hlsearch!

nnoremap <F3> :set hlsearch!<CR>

这篇关于Vim清除最后一个搜索突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆