diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-19 23:43:53 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-19 23:43:53 +1300 |
commit | 062274de75e25ad96f52d39e17844048003b90dc (patch) | |
tree | 093c2479feb70548882938177d0edb95d47056e9 /vim/after/syntax/sh.vim | |
parent | Merge branch 'hotfix/v0.17.2' (diff) | |
parent | Rebuild dotfiles(7) manual from README.md (diff) | |
download | dotfiles-062274de75e25ad96f52d39e17844048003b90dc.tar.gz dotfiles-062274de75e25ad96f52d39e17844048003b90dc.zip |
Merge branch 'release/v0.18.0'v0.18.0
* release/v0.18.0:
Rebuild dotfiles(7) manual from README.md
Bump version number to 0.18.0
Use %:S expansion only when available
Force g:current_compiler removal before check/lint
Use quickfix window for check/lint
Add vim/compiler scripts to vint targets
Use :compiler quickfix systems for Vim/HTML lint
Use :compiler scripts for makeprg setup
Add :lwindow support to Perl check/lint
Adapt sh check/lint to use :lmake
Remove 'shellpipe' setting
Use single-quotes for strings in sh.vim
Use full word "syntax" in sh.vim
Coax sh.vim into accepting #/% param expansion
Mention the Vim plugin dist target in README.md
Add Makefile targets for Vim plugin dists
Diffstat (limited to 'vim/after/syntax/sh.vim')
-rw-r--r-- | vim/after/syntax/sh.vim | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/vim/after/syntax/sh.vim b/vim/after/syntax/sh.vim index 8025c567..08dbd857 100644 --- a/vim/after/syntax/sh.vim +++ b/vim/after/syntax/sh.vim @@ -111,7 +111,7 @@ if exists('b:is_posix') syntax clear shRepeat syntax region shRepeat \ matchgroup=shLoop - \ start="\<while\_s" end="\<do\>"me=e-2 + \ start='\<while\_s' end='\<do\>'me=e-2 \ contains=@shLoopList " Run some clustering that core syntax/sh.vim thinks doesn't apply to POSIX; @@ -119,6 +119,21 @@ if exists('b:is_posix') syntax cluster shCaseList add=shRepeat syntax cluster shFunctionList add=shRepeat + " ${foo%bar}, ${foo%%bar}, ${foo#bar}, and ${foo##bar} are all valid forms + " of parameter expansion in POSIX, but sh.vim makes them conditional on + " Bash or Korn shell. We reinstate them (slightly adapted) here. + syntax match shDerefOp contained + \ '##\|#\|%%\|%' + \ nextgroup=@shDerefPatternList + syntax match shDerefPattern contained + \ '[^{}]\+' + \ contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape + \ nextgroup=shDerefPattern + syntax region shDerefPattern contained + \ start='{' end='}' + \ contains=shDeref,shDerefSimple,shDerefString,shCommandSub + \ nextgroup=shDerefPattern + endif " Some corrections for highlighting specific to the Bash mode |