Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to enable use of mouse in terminal Vim

📅 2013-Jan-25 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ gvim, mouse, terminal, vim ⬩ 📚 Archive

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