Bug#864074: vim: 'set mouse=' in /etc/vim/vimrc.local is ignored unless ~/.vimrc exists

Andreas Beckmann anbe at debian.org
Sun Jun 4 00:10:08 UTC 2017


Package: vim
Version: 2:8.0.0197-4
Severity: important

Hi,

for me the default of 'set mouse=a' is a misfeature, so I want to
disable it globally (my mouse usage ends after marking +
middle-click pasting of text in the terminal, that works fine
without pressing shift).

Unfortunately 'set mouse=' does not work in /etc/vim/vimrc.local, it is
just ignored. Other options work there.
But it works if (even an empty) ~/.vimrc does exist.

This is with vim.basic, running as root, in a fresh stretch install,
three ssh hops, a screen and a su away (where I wouldn't expect a
mouse to be usable) in case it does matter.

While trying to debug this, I also noticed discrepancies in what is set
by default, depending on whether an (empty) ~/.vimrc exists:

* without ~/.vimrc:

:set                                                                                                                                                                                      
--- Options ---
  display=truncate    incsearch         nolangremap           mouse=a             ruler               showcmd             ttimeoutlen=100     ttymouse=xterm
  history=200         langnoremap       nomodeline            nrformats=bin,hex   scrolloff=5         ttimeout            ttyfast             wildmenu
  backspace=indent,eol,start
  fileencodings=ucs-bom,utf-8,default,latin1
  printoptions=paper:a4
  runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
  suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc

* after touching ~/.vimrc:

:set                                                                                                                                                                                                
--- Options ---
nomodeline            ruler               ttyfast             ttymouse=xterm
  backspace=indent,eol,start
  fileencodings=ucs-bom,utf-8,default,latin1
  printoptions=paper:a4
  runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after
  suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc

The set of defaults should not depend on merely the fact that ~/.vimrc exists.

I consider this a regression from jessie, since vimrc.local worked
there without ~/.vimrc for all options I needed (but that didn't
include 'set mouse=').

For reference: these are the options set in jessie by vim.basic
independent from the existence of ~/.vimrc:

:set                                                                                                                                                                                                
--- Options ---
nomodeline            ruler               ttyfast             ttymouse=xterm
  backspace=indent,eol,start
  runtimepath=/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim74,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,/.vim/after
  suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc


Andreas



More information about the pkg-vim-maintainers mailing list