Bug#486114: syntax/sh.vim: highlighting of "for", "if" before/after dashes

James Vega jamessan at debian.org
Tue Jul 1 15:29:52 UTC 2008

On Fri, Jun 13, 2008 at 03:14:38PM +0200, Stephan Beyer wrote:
> "for" and "if" (and others) highlight as bash keywords
> even if in such a case:
> 	git-for-each-ref
> or
> 	git for-each-ref
> The \<for\> matching seems to be not sufficient here.

Indeed. I'll talk to upstream about a possible solution for this.

> PS: Btw, it seems that "while" does not highlight at all.

This is likely because you haven't specified the default shell flavor
that you want sh.vim to highlight as.  This means that it is
highlighting as the shell flavor it detects you using via the filename
or shebang line -- defaulting to Bourne if there's no definite
indication otherwise.

I'd suggest either using "#!/bin/bash" if you intend to be coding
towards bash so that sh.vim can detect that you are using bash.  You can
also specify a default sh-syntax in your ~/.vimrc as described in the
help (":help sh.vim" and then read the first few paragraphs).

GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20080701/88263720/attachment.pgp 

More information about the pkg-vim-maintainers mailing list