How to enable use of mouse in terminal Vim

The mouse can be used naturally in GVim. But, it would be useful to have some mouse functionality in Vim, running in terminal mode too. For example, to scroll the code or to change the size of split windows. This is a nice feature to have, almost all the time we are using the terminal inside a windowing system anyway.

Thankfully, Vim has functionality built-in to use the mouse in terminal mode. The mouse can be enabled by putting this line in your vimrc file:

set mouse=a

Tried with: Vim 7.3

Leave a Reply

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

You are commenting using your 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