Highlighting the current line & column in VIM

It’s already in the VIM help file, but I never found it until now. To highlight the current row/line and the current column use this in your .vimrc:

au WinLeave * set nocursorline nocursorcolumn
au WinEnter * set cursorline cursorcolumn
set cursorline cursorcolumn

I found this quite useful while programming. Eclipse has a similar feature; when I got used to that I started missing it in VIM. Until now that is :)

dr. Sybren A. Stüvel
dr. Sybren A. Stüvel
Open Source software developer, photographer, drummer, and electronics tinkerer

Related