How to show cursorline only in active window of Vim

I find it very useful to have the cursorline enabled in Vim. However, if you are using split windows, the cursorlines of multiple windows can get distracting. Also, this makes it difficult to know which is the active window.

One solution to these problems is to display the cursorline only in the active window. To do that add this to your vimrc:

Tried with: Vim 7.3 and Ubuntu 12.04 LTS

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s