Bug#856273: vim: explain how the various vimrc files are processed

Paul Slootman paul at debian.org
Mon Feb 27 11:19:40 UTC 2017

Package: vim
Version: 2:8.0.0197-2
Severity: wishlist

On a new installation of stretch, I was being frustrated by vim
hijacking the mouse from xterm (so pasting text ended up quite
differently than I was expecting).  I figured out I needed to disable
the mouse support in vim, so I created /etc/vim/vimrc.local and put
set mouse=
in there.

However, the mouse was STILL being hijacked, and ":set mouse" showed
that the setting in /etc/vim/vimrc.local was apparently being ignored.
Via strace I discovered that defaults.vim was being read AFTER
/etc/vim/vimrc.local was processed, and that overruled the vimrc.local.
I don't find this logical, I'd expect that anything I put in
/etc/vim/vimrc.local would be the "default" setting when starting up vim
and any other fine-tuning can be done via the users' ~/.vimrc .

Wierder was that I had upgraded my own system earlier and didn't have
problems with the mouse there. After a lot of digging I discovered that
if you have a (non-empty!) ~/.vimrc, then the defaults.vim file isn't

It would be nice if /etc/vim/vimrc.local is read after any and all other
system rc files, and before the users' rc files.

I couldn't find any documentation about this, it would be nice if some
text could be added to README.Debian about these intricacies.

-- Package-specific info:

--- real paths of main Vim binaries ---
/usr/bin/vi is /usr/bin/vim.gtk
/usr/bin/vim is /usr/bin/vim.gtk
/usr/bin/gvim is /usr/bin/vim.gtk

-- System Information:
Debian Release: 9.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.9-wurtel-ws (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages vim depends on:
ii  libacl1      2.2.52-3
ii  libc6        2.24-9
ii  libgpm2      1.20.4-6.2
ii  libselinux1  2.6-3
ii  libtinfo5    6.0+20161126-1
ii  vim-common   2:8.0.0197-2
ii  vim-runtime  2:8.0.0197-2

vim recommends no packages.

Versions of packages vim suggests:
ii  exuberant-ctags [ctags]  1:5.9~svn20110310-11
pn  vim-doc                  <none>
pn  vim-scripts              <none>

-- no debconf information

More information about the pkg-vim-maintainers mailing list