Package: vim Version: 2:8.1.0875-5 Severity: important Dear Maintainer,
*** Reporter, please consider answering these questions, where appropriate *** The load-order indicated by :version Note: $VIM/vimrc is /usr/share/vim/vimrc which is a soft-link to /etc/vim/vimrc. system vimrc file: "$VIM/vimrc" user vimrc file: "$HOME/.vimrc" 2nd user vimrc file: "~/.vim/vimrc" user exrc file: "$HOME/.exrc" defaults file: "$VIMRUNTIME/defaults.vim" fall-back for $VIM: "/usr/share/vim" This is a generalization of https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864074 That bug report complains rightly about the behavior mentioned in patch 7.4.2111 which loads defaults.vim if no .vimrc is found. However, it loads this even if /etc/vim/vimrc *is* found. A new method has been proposed, but the ticket is still open: https://github.com/vim/vim/issues/2917 The "defaults file" really makes no sense here. Defaults implies a default configuration -- items that are set which are only set if not previously set. To load defaults after /etc/vimrc and $HOME/.vimrc etc makes absolutely no sense. The vim devs know this, but for some hilarious reason are afraid reverting to the long-standing behavior will break things for new users *facepalm* since that patch release. Expected behavior can be achieved by (solution 1) the following at the top of /etc/vim/vimrc (suggested by "cheater" in the bug 2042 thread ref'd below): :if ! filereadable(expand('~/.vimrc')) && ! filereadable(expand('~/.vim/vimrc')) : source $VIMRUNTIME/defaults.vim : let skip_defaults_vim=1 :endif This ensures the defaults are loaded as before, but can be overridden in /etc/vim/vimrc. However, it also checks to make sure that individuals with a .vimrc file of their own will NOT read the defaults file, as is current behavior. Solution 2 is as follows: 1. Copy the contents of defaults.vim to /etc/vim/defaults.vim. 2. Truncate /usr/share/vim/.../defaults.vim. Make it a 0-length file. 3. in /etc/vim/vimrc, source /etc/vim/defaults.vim file as above: :if ! filereadable(expand('~/.vimrc')) && ! filereadable(expand('~/.vim/vimrc')) : source /etc/vim/defaults.vim :endif The benefit of this solution is that admins can modify default.vim. Solution 3 is to reverse-patch vim with the 7.4.2111 patch. Users who want the newer features will need to explicitly load them, as has always been the case before the patch. For more reading on this topic, see the thread at https://github.com/vim/vim/issues/2042 should be helpful. Long thread but insightful. *** End of the template - remove these template lines *** -- Package-specific info: --- real paths of main Vim binaries --- /usr/bin/vi is /usr/bin/vim.basic /usr/bin/vim is /usr/bin/vim.basic -- System Information: Debian Release: 10.11 APT prefers oldstable-updates APT policy: (500, 'oldstable-updates'), (500, 'oldstable') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-18-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages vim depends on: ii libacl1 2.2.53-4 ii libc6 2.28-10 ii libgpm2 1.20.7-5 ii libselinux1 2.8-1+b1 ii libtinfo6 6.1+20181013-2+deb10u2 ii vim-common 2:8.1.0875-5 ii vim-runtime 2:8.1.0875-5 vim recommends no packages. Versions of packages vim suggests: pn ctags <none> pn vim-doc <none> pn vim-scripts <none> -- no debconf information