How do I make gvim ignore mouse clicks. I'm really sick of the trackpad making my cursor all over the place. I use xubuntu if that means anything.

link|improve this question

0% accept rate
feedback

4 Answers

I use:

:set mouse=c

This sets it to command-line mode. You can read about all of the options by typing,

:help mouse

To avoid needing to type the command each time, you can put it in your ~/.vimrc

link|improve this answer
feedback
:set mouse=

see also: http://vimdoc.sourceforge.net/htmldoc/term.html#mouse-using

link|improve this answer
feedback

As akira said, you can disable the mouse entirely, but you can also selectively disable mouse buttons by mapping them to <nop>. For example, if it is just a problem in insert mode, and just the left mouse button:

:imap <LeftMouse> <nop>

You can even do it for double clicks:

:imap <2-LeftMouse> <nop>

See:

:help gui-mouse-mapping
:help map-overview
link|improve this answer
feedback

I had same problem and though one can disable mouse/touchpad entirely there is a better solution: to disable touchpad while typing.

For Ubuntu there is a how-to.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.