diff options
author | Christian Clason <c.clason@uni-graz.at> | 2023-10-28 23:53:08 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2023-10-29 01:37:07 +0200 |
commit | a5629abce29668e9781768986f7e799ba429f017 (patch) | |
tree | 4c4ec352cd4e4fc1c72d9e86363bce7f5113ea10 | |
parent | c34e81660884f1b6a50536ce39dbab7cd66b502f (diff) | |
download | rneovim-a5629abce29668e9781768986f7e799ba429f017.tar.gz rneovim-a5629abce29668e9781768986f7e799ba429f017.tar.bz2 rneovim-a5629abce29668e9781768986f7e799ba429f017.zip |
vim-patch:a390e984db20
runtime(sh): add shDblParen to shLoopList for bash (vim/vim#13445)
add shDblParen to shLoopList to correctly highlight
arithmetic expressions for Bash and Ksh
This should allow code such as:
```bash
declare -i i j
for i in foo bar
do ((j = 1 << j))
done
```
https://github.com/vim/vim/commit/a390e984db20575dc726b4e0ebf95582265df8e7
Co-authored-by: Lucien Grondin <grondilu@yahoo.fr>
-rw-r--r-- | runtime/syntax/sh.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/syntax/sh.vim b/runtime/syntax/sh.vim index 8674ded9e4..d64c3a9b08 100644 --- a/runtime/syntax/sh.vim +++ b/runtime/syntax/sh.vim @@ -163,7 +163,7 @@ syn cluster shIdList contains=shArithmetic,shCommandSub,shCommandSubBQ,shWrapLin syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo syn cluster shLoopList contains=@shCaseList,@shErrorList,shCaseEsac,shConditional,shDblBrace,shExpr,shFor,shIf,shOption,shSet,shTest,shTestOpr,shTouch if exists("b:is_kornshell") || exists("b:is_bash") - syn cluster shLoopoList add=shForPP + syn cluster shLoopList add=shForPP,shDblParen endif syn cluster shPPSLeftList contains=shAlias,shArithmetic,shCmdParenRegion,shCommandSub,shCtrlSeq,shDeref,shDerefSimple,shDoubleQuote,shEcho,shEscape,shExDoubleQuote,shExpr,shExSingleQuote,shHereDoc,shNumber,shOperator,shOption,shPosnParm,shHereString,shRedir,shSingleQuote,shSpecial,shStatement,shSubSh,shTest,shVariable syn cluster shPPSRightList contains=shDeref,shDerefSimple,shEscape,shPosnParm |