ronny.haryan.to

Icon

Print: $9.50 — Online: free

Tip: Quick no-highlight-search-matches in Vim

Somebody asked how to quickly disable search matches highlighting in vim because it tends to be distractful after a while.

Vim has hlsearch and the corresponding nohlsearch to toggle this behaviour (see :help hlsearch for more info). So we could create mappings to quickly disable hlsearch, for example I use F12 for this.

map     <F12>   :nohlsearch<CR>
imap    <F12>   <ESC>:nohlsearch<CR>i
vmap    <F12>   <ESC>:nohlsearch<CR>gv

Category: Linux, Tips

Tagged:

Comments are closed.

About

Ronny Haryanto is a technology addict/chef wannabe living in beautiful Melbourne, Australia.

Read more…

Follow Me on Twitter

Follow @ronny on Twitter where I post much more often than my blog.