Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
436 views
in Technique[技术] by (71.8m points)

vim - Vim清除最后一个搜索突出显示(Vim clear last search highlighting)

After doing a search in Vim, I get all the occurrences highlighted.

(在Vim中进行搜索后,我将所有出现的事件突出显示。)

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?

(有没有一种方法可以暂时禁用突出显示,然后在需要时重新启用它?)

  ask by Gabriel Solomon translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

To turn off highlighting until the next search:

(要关闭高亮显示直到下一次搜索:)

:noh

Or turn off highlighting completely:

(或完全关闭突出显示:)

set nohlsearch

Or, to toggle it:

(或者,要切换它:)

set hlsearch!

nnoremap <F3> :set hlsearch!<CR>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...