From: Michael Prokop Date: Wed, 27 May 2020 11:41:13 +0000 (+0200) Subject: vimrc: support vim-tiny and older versions of vim X-Git-Tag: v0.17.2~3^2 X-Git-Url: https://git.grml.org/?a=commitdiff_plain;h=94d6068324284c8c75bc6774ab73bfa29cb94374;hp=94d6068324284c8c75bc6774ab73bfa29cb94374;p=grml-etc-core.git vimrc: support vim-tiny and older versions of vim If vim-tiny is present (lacking +eval feature, see `vim --version`), then invoking vim fails with: | Error detected while processing /usr/share/vim/vimrc: | line 30: | E319: Sorry, the command is not available in this version: let g:skip_defaults_vim=1 The file /usr/share/vim/vimrc is a symlink to /etc/vim/vimrc: | % ls -la /usr/share/vim/vimrc | lrwxrwxrwx 1 root root 14 May 12 02:37 /usr/share/vim/vimrc -> /etc/vim/vimrc So if the eval feature is missing, don't set skip_defaults_vim=1. Furthermore, on older vim versions we're failing with: | Error detected while processing /code/etc/vim/vimrc: | line 61: | E474: Invalid argument: display=truncate | line 201: | E474: Invalid argument: listchars=eol:$,precedes:«,extends:»,tab:»·,trail:· The "set display=truncate" only works as of patch-7.4.2115 or newer, see upstream vim.git commit b9a46fec3e79. The listchars setting only works when running in utf-8 mode, by default vim-tiny is running in latin1 though. Closes: grml/grml-etc-core#99 ---