vimrc not accepting mouse-=a command

If you are using Debian 9 (Strecth), edit the file /usr/share/vim/vim80/defaults.vim and change the line 70 to put

set mouse-=a

Best Regards

Thibault


I know, that this question is a bit old, but I just want to clarify, why both answers above are correct and why it's working that way.

On Debian systems the way the config files for vim are loaded is like this:

  1. Load settings in /etc/vim/vimrc
  2. If exists, load settings from /etc/vim/vimrc.local
  3. If ~/.vimrc does not exist and there is no "let g:skip_defaults_vim = 1" in /etc/vim/vimrc or /etc/vim/vimrc.local, load settings from /usr/share/vim/vim80/defaults.vim otherwise load settings from ~/.vimrc (if it exists).

Details for that can be found in the config files itself, as well as in a discussion on bugs.debian.org

So to solve your issue you have two ways to go:

  1. Insert "let g:skip_defaults_vim = 1" at the beginning of /etc/vim/vimrc.local.
  2. Create an empty ~/.vimrc by issuing touch ~/.vimrc.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864074

Tags:

Vim