Taylor Hedberg wrote:
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. :)
I think deprecated syntax should be flagged. However, I've uploaded syntax/sh.vim v121 which has a new feature:
if you put
  let g:sh_no_error= 1
into your .vimrc, you will no longer see error highlighting (with v121).

Regards,
Chip Campbell

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to