diff options
author | dkearns <dougkearns@gmail.com> | 2023-12-06 08:58:40 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-05 22:58:40 +0100 |
commit | 4e043b1fc7eeba2f726bbca3d50a4e872c8cb658 (patch) | |
tree | 5f3a0bb11acff8236817732490a7dfa34a2ec34c | |
parent | 3f7855a6123cce20db11b9047ab1860bcd56de63 (diff) |
runtime(vim): Update syntax file and syntax test (#13632)
Add missing assignment operators (:let*=, :let/= and :let%=).
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_keymap_00.dump (renamed from runtime/syntax/testdir/dumps/vim_00.dump) | 2 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_keymap_01.dump (renamed from runtime/syntax/testdir/dumps/vim_01.dump) | 0 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_keymap_99.dump (renamed from runtime/syntax/testdir/dumps/vim_99.dump) | 0 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_variables_00.dump | 20 | ||||
-rw-r--r-- | runtime/syntax/testdir/dumps/vim_variables_99.dump | 20 | ||||
-rw-r--r-- | runtime/syntax/testdir/input/vim_keymap.vim (renamed from runtime/syntax/testdir/input/vim.vim) | 0 | ||||
-rw-r--r-- | runtime/syntax/testdir/input/vim_variables.vim | 11 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 3 |
8 files changed, 54 insertions, 2 deletions
diff --git a/runtime/syntax/testdir/dumps/vim_00.dump b/runtime/syntax/testdir/dumps/vim_keymap_00.dump index edb6a6f6ce..974c5ad31c 100644 --- a/runtime/syntax/testdir/dumps/vim_00.dump +++ b/runtime/syntax/testdir/dumps/vim_keymap_00.dump @@ -17,4 +17,4 @@ |s+0#af5f00255&|c|r|i|p|t|e|n|c|o|d|i|n|g| +0#0000000&|u|t|f|-+0#af5f00255&|8+0#e000002&| +0#0000000&@54 @75 |@+0#4040ff13&@2| @71 -|"+0#0000000&|i|n|p|u|t|/|v|i|m|.|v|i|m|"| |2|6|L|,| |3|9@1|2|B| @30|1|,|1| @10|T|o|p| +|"+0#0000000&|i|n|p|u|t|/|v|i|m|_|k|e|y|m|a|p|.|v|i|m|"| |2|6|L|,| |3|9@1|2|B| @23|1|,|1| @10|T|o|p| diff --git a/runtime/syntax/testdir/dumps/vim_01.dump b/runtime/syntax/testdir/dumps/vim_keymap_01.dump index 9a7a8333a6..9a7a8333a6 100644 --- a/runtime/syntax/testdir/dumps/vim_01.dump +++ b/runtime/syntax/testdir/dumps/vim_keymap_01.dump diff --git a/runtime/syntax/testdir/dumps/vim_99.dump b/runtime/syntax/testdir/dumps/vim_keymap_99.dump index ad6b5a58b1..ad6b5a58b1 100644 --- a/runtime/syntax/testdir/dumps/vim_99.dump +++ b/runtime/syntax/testdir/dumps/vim_keymap_99.dump diff --git a/runtime/syntax/testdir/dumps/vim_variables_00.dump b/runtime/syntax/testdir/dumps/vim_variables_00.dump new file mode 100644 index 0000000000..ecf420d43d --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_variables_00.dump @@ -0,0 +1,20 @@ +>"+0#0000e05#ffffff0| |V|i|m| |v|a|r|i|a|b|l|e| |h|i|g|h|l|i|g|h|t|i|n|g| +0#0000000&@47 +@75 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|e|x|p|r| @60 +@75 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|++0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|-+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|*+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|/+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|%+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|.+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|.+0#af5f00255&@1|=| +0#0000000&|e|x|p|r| @58 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|"+0#0000000&|i|n|p|u|t|/|v|i|m|_|v|a|r|i|a|b|l|e|s|.|v|i|m|"| |1@1|L|,| |1|5|8|B| @21|1|,|1| @10|A|l@1| diff --git a/runtime/syntax/testdir/dumps/vim_variables_99.dump b/runtime/syntax/testdir/dumps/vim_variables_99.dump new file mode 100644 index 0000000000..230c121d10 --- /dev/null +++ b/runtime/syntax/testdir/dumps/vim_variables_99.dump @@ -0,0 +1,20 @@ +|"+0#0000e05#ffffff0| |V|i|m| |v|a|r|i|a|b|l|e| |h|i|g|h|l|i|g|h|t|i|n|g| +0#0000000&@47 +@75 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|=+0#af5f00255&| +0#0000000&|e|x|p|r| @60 +@75 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|++0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|-+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|*+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|/+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|%+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +|l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|.+0#af5f00255&|=| +0#0000000&|e|x|p|r| @59 +>l+0#af5f00255&|e|t| +0#0000000&|f+0#00e0e07&|o@1| +0#0000000&|.+0#af5f00255&@1|=| +0#0000000&|e|x|p|r| @58 +|~+0#4040ff13&| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|~| @73 +|"+0#0000000&|i|n|p|u|t|/|v|i|m|_|v|a|r|i|a|b|l|e|s|.|v|i|m|"| |1@1|L|,| |1|5|8|B| @21|1@1|,|1| @9|A|l@1| diff --git a/runtime/syntax/testdir/input/vim.vim b/runtime/syntax/testdir/input/vim_keymap.vim index 983c822c55..983c822c55 100644 --- a/runtime/syntax/testdir/input/vim.vim +++ b/runtime/syntax/testdir/input/vim_keymap.vim diff --git a/runtime/syntax/testdir/input/vim_variables.vim b/runtime/syntax/testdir/input/vim_variables.vim new file mode 100644 index 0000000000..93ad6d911f --- /dev/null +++ b/runtime/syntax/testdir/input/vim_variables.vim @@ -0,0 +1,11 @@ +" Vim variable highlighting + +let foo = expr + +let foo += expr +let foo -= expr +let foo *= expr +let foo /= expr +let foo %= expr +let foo .= expr +let foo ..= expr diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index a15a220168..5eb3154963 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -4,6 +4,7 @@ " Last Change: May 09, 2023 " 2023 Nov 12 by Vim Project (:let-heredoc improvements) " 2023 Nov 20 by Vim Project (:loadkeymap improvements) +" 2023 Dec 06 by Vim Project (add missing :let{op}= assignment operators) " Version: 9.0-25 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Automatically generated keyword lists: {{{1 @@ -233,7 +234,7 @@ syn keyword vimAugroupKey contained aug[roup] " Operators: {{{2 " ========= syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimType,vimRegister,vimContinue,vim9Comment,vimVar -syn match vimOper "||\|&&\|[-+.!]" skipwhite nextgroup=vimString,vimSpecFile +syn match vimOper "||\|&&\|[-+*/%.!]" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "\%#=1\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\|!\~#\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile syn match vimOper "\(\<is\|\<isnot\)[?#]\{0,2}\>" skipwhite nextgroup=vimString,vimSpecFile syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=vimoperStar,@vimOperGroup |