bash allows (yes, it is a "bashism") syntax like:
$ echo ${var:9:5}
To mean extract a substring of the variable, starting at position 9 and of 
length 5.
But is also allows the offset (and then length, too, but ignore that for now) 
to benegative.  But, alas, as noted in "man bash", if the offset is negative, 
you have toput a space after the :, in order to avoid ambiguity with the usual 
${var:-xxx}construct.  So, you have to write:
$ echo ${var: -9:5}
Alas, vim flags this as an error.  If I take out the space before the -, 
thehighlighting is OK.  But with the space, it is flagged as error.
Can this be fixed?
Note: I tried contacting the listed author/maintainer (Charles Campbell) via 
email first (before posting this), but the mail bounced.  It looks like the 
sh.vim file hasn't been updated since 2014.
Note also: This was tested under VIM 7.4 (which is what I use).  If it has been 
fixed in a later version, please let me know.

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/989099977.5724019.1558469869750%40mail.yahoo.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to