Linda W, Fri 2011-12-09 @ 02:46:15-0800:
> As for the red flagging...
> 
> I thought it was for syntax errors?   since it isn't a syntax error,
> but merely an older standard, shouldn't
> it not be flagged as illegal?

Yeah, it should probably be accepted as valid syntax by Vim despite its
deprecation, since it does still work in the current bash 4.2. It's
likely that the creator of the sh.vim syntax file just didn't know about
that older syntax.

The same goes for the for loop with braces, though I can't find any
reference at all to that syntax online. Is that an older form as well?

In any case, regardless of how Vim handles syntax highlighting in bash
scripts, it's probably better in general to stick with the more widely
accepted syntax for this sort of thing. If nothing else, it avoids
confusing people who don't know about the undocumented versions when
they read your code. :)

Attachment: pgpN5X5mWWLTZ.pgp
Description: PGP signature

Reply via email to