]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(vim): Update syntax file and syntax test (#13632)
authordkearns <dougkearns@gmail.com>
Tue, 5 Dec 2023 21:58:40 +0000 (08:58 +1100)
committerGitHub <noreply@github.com>
Tue, 5 Dec 2023 21:58:40 +0000 (22:58 +0100)
Add missing assignment operators (:let*=, :let/= and :let%=).

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/syntax/testdir/dumps/vim_keymap_00.dump [moved from runtime/syntax/testdir/dumps/vim_00.dump with 85% similarity]
runtime/syntax/testdir/dumps/vim_keymap_01.dump [moved from runtime/syntax/testdir/dumps/vim_01.dump with 100% similarity]
runtime/syntax/testdir/dumps/vim_keymap_99.dump [moved from runtime/syntax/testdir/dumps/vim_99.dump with 100% similarity]
runtime/syntax/testdir/dumps/vim_variables_00.dump [new file with mode: 0644]
runtime/syntax/testdir/dumps/vim_variables_99.dump [new file with mode: 0644]
runtime/syntax/testdir/input/vim_keymap.vim [moved from runtime/syntax/testdir/input/vim.vim with 100% similarity]
runtime/syntax/testdir/input/vim_variables.vim [new file with mode: 0644]
runtime/syntax/vim.vim

similarity index 85%
rename from runtime/syntax/testdir/dumps/vim_00.dump
rename to runtime/syntax/testdir/dumps/vim_keymap_00.dump
index edb6a6f6ce1a8c97d39f19f540a7dccade8d2d11..974c5ad31ccb2bd31aae6acf9589e513e7b396a1 100644 (file)
@@ -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_variables_00.dump b/runtime/syntax/testdir/dumps/vim_variables_00.dump
new file mode 100644 (file)
index 0000000..ecf420d
--- /dev/null
@@ -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 (file)
index 0000000..230c121
--- /dev/null
@@ -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_variables.vim b/runtime/syntax/testdir/input/vim_variables.vim
new file mode 100644 (file)
index 0000000..93ad6d9
--- /dev/null
@@ -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
index a15a22016871ffb0fbfbae9cbfd164e45924575d..5eb31549639cd2dc1b1e86edf849fdf4ad245b52 100644 (file)
@@ -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