Archive for April 4th, 2005

Killer Vim tip

April 04th, 2005 | Category: Opensource

I finally found a good tip on how to make the search highlighting that is turned on by default “work” better:

awkay69@hotmail.com, November 4, 2004 8:41
I’ve found that I love the highlighting, until I decide to move the cursor and begin editing…So, I just added these to .vimrc:

:map j <Down>:nohlsearch<CR>
:map k <Up>:nohlsearch<CR>
:map h <Left>:nohlsearch<CR>
:map l <Right>:nohlsearch<CR>

This, of course, assumes you use the vi cursor keys h,j,k,l…you could also remap the arrow keys if you are into using things so far away from the normal typing position.

The original post from the Vim site is here. I’ve been using this tip for the past few days and it rocks.

No comments