runtime(vim): Update base-syntax, improve :set highlighting
- Match comments and trailing bar after :set without args.
- Match the <...> form for key code options.
- Remove orphaned vim_ex_python[3x]* dump files (Aliaksei Budavei).
closes: #17397
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim
index 0181a90..1ff7d71 100644
--- a/runtime/syntax/vim.vim
+++ b/runtime/syntax/vim.vim
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
-" Last Change: 2025 May 22
+" Last Change: 2025 May 29
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -951,14 +951,14 @@
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
" Set command and associated set-options (vimOptions) with comment {{{2
-syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetArgs
+syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimCmdSep,vimComment,vimSetArgs
syn region vimSetComment contained start=+"+ skip=+\n\s*\%(\\\||"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString extend
syn match vimSetCmdSep contained "|" skipwhite nextgroup=@vimCmdList,vimSubst1,vimFunc
syn match vimSetEscape contained "\\\%(\\[|"]\|.\)"
syn match vimSetBarEscape contained "\\|"
syn match vimSetQuoteEscape contained +\\"+
syn region vimSetArgs contained
- \ start="\S"
+ \ start="\l\|<"
\ skip=+\n\s*\%(\\\|["#]\\ \)\|^\s*"\\ +
\ end=+\ze\\\@1<![|"]+
"\ assume this isn't an escaped char with backslash on the previous line
@@ -968,6 +968,8 @@
\ nextgroup=vimSetCmdSep,vimSetComment,vim9Comment
\ contains=@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
\ keepend
+" TODO: restrict this to valid values?
+syn match vimOption contained "<[^>]\+>" contains=vimOption
syn region vimSetEqual contained
\ matchgroup=vimOper
\ start="[=:]\|[-+^]="