Edit: The problem of an enabled mouse in
vim appears to be specific to
gnome-terminal (version 220.127.116.11-1; I am using gnome 3 fallback mode). If I run
xterm, mouse support in
vim is disabled by default, and I have the option to enable it (
:set mouse=a, which I never do) and disable it (
:set mouse=). In contrast, when I run
gnome-terminal, mouse support is enabled by default and it is not possible to disable it (
:set mouse= has no effect). Is there a solution short of changing terminal emulator?
I want to completely disable mouse support in
vim. I am running
vim version 2:7.3.547-3 through
gnome-terminal version 18.104.22.168-1. The following commands, whether executed directly in vim or added to my
.vimrc file, fail to disable mouse support:
set mouse = set mouse =""
Based on reading the vim manual and posts online, one or both of these commands should work. In particular, the vim manual states the following
'mouse' string (default "", "a" for GUI, MS-DOS and Win32) The mouse can be enabled for different modes: n Normal mode v Visual mode i Insert mode c Command-line mode h all previous modes when editing a help file a all previous modes r for |hit-enter| and |more-prompt| prompt Normally you would enable the mouse in all four modes with: > :set mouse=a When the mouse is not enabled, the GUI will still use the mouse for modeless selection. This doesn't move the text cursor.
I am using a laptop and each time my hand brushes the trackpad, my cursor position in vim moves abruptly.