[Git-commits] [grml/grml-etc-core] 94d606: vimrc: support vim-tiny and older versions of vim

Michael Prokop noreply at github.com
Thu May 28 14:29:04 CEST 2020


  Branch: refs/heads/mika/gh99
  Home:   https://github.com/grml/grml-etc-core
  Commit: 94d6068324284c8c75bc6774ab73bfa29cb94374
      https://github.com/grml/grml-etc-core/commit/94d6068324284c8c75bc6774ab73bfa29cb94374
  Author: Michael Prokop <mika at grml.org>
  Date:   2020-05-28 (Thu, 28 May 2020)

  Changed paths:
    M etc/vim/vimrc

  Log Message:
  -----------
  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




More information about the Git-commits mailing list