Bug#552108: vim-runtime: sh syntax highlighting should default to POSIX.

Timothy Allen thristian at gmail.com
Fri Oct 23 12:27:31 UTC 2009

Package: vim-nox
Version: 2:7.2.245-2
Severity: wishlist

I'm aware that the issue of Vim's shell-script syntax-highlighting
defaults have been a hot issue on the vim-dev mailing-list, spawning
long and involved threads such as these:


In Debian bug 361177, sh.vim learned a g:is_posix configuration value,
and the current sh.vim documentation states:

    If there's no "#! ..." line, and the user hasn't availed
    himself/herself of a default sh.vim syntax setting as just shown,
    then syntax/sh.vim will assume the Bourne shell syntax.  No need to
    quote RFCs or market penetration statistics in error reports, please
    -- just select the default version of the sh your system uses in
    your <.vimrc>.

Reading through the threads above, it seems one of the major reasons
contributing to upstream defaulting to classic Bourne syntax is that
many people use Vim on systems with a classic Bourne /bin/sh for legacy
reasons. This seems quite reasonable, however Debian is not such
a system. I could "just select the default version of sh my system uses
in my .vimrc", but since every Debian user has a POSIX /bin/sh, it makes
sense that the Debian vim package should be configured appropriately

Adding this to $VIMRUNTIME/debian.vim along with the other
Debian-integration customizations should do the trick nicely:

    let g:is_posix = 1

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages vim-nox depends on:
ii  libacl1                   2.2.48-1       Access control list shared library
ii  libc6                     2.9-25         GNU C Library: Shared libraries
ii  libgpm2                   1.20.4-3.2     General Purpose Mouse - shared lib
ii  libncurses5               5.7+20090803-2 shared libraries for terminal hand
ii  libperl5.10               5.10.1-5       Shared Perl library
ii  libruby1.8          Libraries necessary to run Ruby 1.
ii  libselinux1               2.0.85-4       SELinux runtime shared libraries
ii  python2.5                 2.5.4-2        An interactive high-level object-o
ii  tcl8.4                    8.4.19-4       Tcl (the Tool Command Language) v8
ii  vim-common                2:7.2.245-2    Vi IMproved - Common files
ii  vim-runtime               2:7.2.245-2    Vi IMproved - Runtime files

vim-nox recommends no packages.

Versions of packages vim-nox suggests:
pn  cscope                        <none>     (no description available)
pn  vim-doc                       <none>     (no description available)

-- no debconf information

More information about the pkg-vim-maintainers mailing list