Package: vim
Version: 2:8.1.0875-5
Followup-For: Bug #856273

Since I just spent several hours tracking down a vimrc-related
problem, I thought I'd add a couple of comments.

Short Version:

It would be good if there were a README.Debian, and it would be good
if it noted that a personal vimrc will block loading standard defaults
that, among other things, enable syntax highlighting and filetype
detection, and that to retain this one can put
    source $VIMRUNTINE/defaults.vim
at the start of the personal vimrc.

Longer Version:

First, it would be helpful if there were a README.Debian as well as a
NEWS.Debian file.

Second, I tried adding a small customization and discovered it
completely disabled a plugin I had installed to
~/.vim/pack/thirdparty/start.  Even the most trivial vimrc did so.  I
found this extremely surprising and wonder if it must be so.  If it
must, it would be helpful to document it more prominently.

When I had a vimrc, $VIMRUNTIME/defaults.vim was never sourced and
syntax and filetype detection were never enabled.  I believe, based on
vim -V's output, that the activation of these features caused my
plugin to be scanned properly.

I even tried adding source $VIM/vimrc early on to my personal vimrc,
which didn't help.  Adding source $VIMRUNTINE/defaults.vim to my vimrc
did fix the problem.

It is true that NEWS.Debian is pretty explicit that any personal vimrc
prevents loading of the defaults, though the implication that plugins
and syntax highlighting would stop working was not. And you comment
that the blocked loading of the defaults is upstream behavior.

:he vimrc does in fact describe this behavior in the Initialization
section (4), item 3 c; 3 c V even notes that the defaults.vim file
sets syntax on and filetype on, so that information is somewhere :)
But it then goes on in item 4 to say that plugin scripts are loaded,
which sounds unconditional.  BTW, I didn't fully get this because 3
describes the loading of personal vimrc in its introduction and then 3
b says system configuration is loaded unconditionally.  I.e., I kind
of stopped reading there.  The problem is that 3 b's $VIM/vimrc is not
the same as 3 c V's $VIMRUNTIME/defaults.vim.

The origin of my difficulty was the belief that my vimrc was just
adding tweaks to what I had without it, when it is actually replacing
all the configuration that is setup in defaults.vim.

BTW, the plugin in question was vimoutliner.  I don't know if a vim
plugin packaged for Debian and installed with Debian vim's manager
would behave the same way.  vimoutliner used to be in Debian, but it
was unmaintained and got kicked out.  I've since worked with upstream
on the installation process and documentation of same.

-- 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.9
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-16-amd64 (SMP w/8 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE= 
(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>
ii  vim-doc      2:8.1.0875-5
pn  vim-scripts  <none>

-- no debconf information

Reply via email to