ronny.haryan.to

Icon

Print: $9.50 — Online: free

My .vimrc for Vim

Here’s my .vimrc configuration file for Vim. I will update the file from time to time but the URL for the file will remain the same.

I use the same .vimrc when I’m in Linux, Windows, Solaris and Mac OS X. The file is mostly commented so you can change or customize it to your own liking. Some parts are taken from various sources but maybe I forgot to write credits in the comments, if you spot any please inform me.

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

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.