Skip to content

Commit

Permalink
runtime(vim): Update syntax file and syntax test (#13632)
Browse files Browse the repository at this point in the history
Add missing assignment operators (:let*=, :let/= and :let%=).

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
dkearns committed Dec 5, 2023
1 parent 3f7855a commit 4e043b1
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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|
File renamed without changes.
File renamed without changes.
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/vim_variables_00.dump
Original file line number Diff line number Diff line change
@@ -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|
20 changes: 20 additions & 0 deletions runtime/syntax/testdir/dumps/vim_variables_99.dump
Original file line number Diff line number Diff line change
@@ -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|
File renamed without changes.
11 changes: 11 additions & 0 deletions runtime/syntax/testdir/input/vim_variables.vim
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion runtime/syntax/vim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4e043b1

Please sign in to comment.