summaryrefslogtreecommitdiffstats
path: root/runtime/syntax/generator
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:05:19 +0000
commita4e9136f68a40b1cb0eb6df5a5f06603224a87f4 (patch)
treeba32e0d0069ad6adfd6b32d05161a03eea5e4c7c /runtime/syntax/generator
parentReleasing progress-linux version 2:9.1.0496-1~progress7.99u1. (diff)
downloadvim-a4e9136f68a40b1cb0eb6df5a5f06603224a87f4.tar.xz
vim-a4e9136f68a40b1cb0eb6df5a5f06603224a87f4.zip
Merging upstream version 2:9.1.0698.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'runtime/syntax/generator')
-rw-r--r--runtime/syntax/generator/Makefile6
-rw-r--r--runtime/syntax/generator/gen_syntax_vim.vim19
-rw-r--r--runtime/syntax/generator/vim.vim.base298
3 files changed, 207 insertions, 116 deletions
diff --git a/runtime/syntax/generator/Makefile b/runtime/syntax/generator/Makefile
index 3cf4b95..a7ccba3 100644
--- a/runtime/syntax/generator/Makefile
+++ b/runtime/syntax/generator/Makefile
@@ -1,5 +1,5 @@
VIM_SRCDIR = ../../../src
-RUN_VIM = $(VIM_SRCDIR)/vim -N -u NONE -i NONE -n
+RUN_VIMPROG = $(VIM_SRCDIR)/vim -N -u NONE -i NONE -n
REVISION ?= $(shell date +%Y-%m-%dT%H:%M:%S%:z)
SRC = $(VIM_SRCDIR)/eval.c $(VIM_SRCDIR)/ex_cmds.h $(VIM_SRCDIR)/ex_docmd.c \
@@ -15,13 +15,13 @@ generate: vim.vim
vim.vim: vim.vim.rc update_date.vim
@echo "Generating vim.vim ..."
@cp -f vim.vim.rc ../vim.vim
- @$(RUN_VIM) -S update_date.vim
+ @$(RUN_VIMPROG) -S update_date.vim
@echo "done."
vim.vim.rc: gen_syntax_vim.vim vim.vim.base $(SRC)
@echo "Generating vim.vim.rc ..."
@rm -f sanity_check.err generator.err
- @$(RUN_VIM) -S gen_syntax_vim.vim
+ @$(RUN_VIMPROG) -S gen_syntax_vim.vim
@if test -f sanity_check.err ; then \
echo ; \
echo "Sanity errors:" ; \
diff --git a/runtime/syntax/generator/gen_syntax_vim.vim b/runtime/syntax/generator/gen_syntax_vim.vim
index 8b76775..480038e 100644
--- a/runtime/syntax/generator/gen_syntax_vim.vim
+++ b/runtime/syntax/generator/gen_syntax_vim.vim
@@ -2,7 +2,7 @@
" Language: Vim script
" Maintainer: Hirohito Higashi (h_east)
" URL: https://github.com/vim-jp/syntax-vim-ex
-" Last Change: 2024 Apr 07
+" Last Change: 2024 Aug 23
" Version: 2.1.1
let s:keepcpo= &cpo
@@ -275,6 +275,8 @@ function! s:get_vim_command_type(cmd_name)
let menu_prefix = '^\%([acinostvx]\?\|tl\)'
let map_prefix = '^[acilnostvx]\?'
let exclude_list =<< trim EOL
+ 2match
+ 3match
Next
Print
X
@@ -283,6 +285,7 @@ function! s:get_vim_command_type(cmd_name)
augroup
autocmd
behave
+ call
catch
def
doautoall
@@ -297,10 +300,16 @@ function! s:get_vim_command_type(cmd_name)
enddef
endfunction
execute
+ final
+ for
function
insert
+ let
+ loadkeymap
map
mapclear
+ match
+ noremap
new
normal
popup
@@ -313,6 +322,8 @@ function! s:get_vim_command_type(cmd_name)
substitute
syntax
throw
+ unlet
+ unmap
var
vim9script
EOL
@@ -516,15 +527,15 @@ function! s:parse_vim_complete_name(li)
new
exec 'read ' . file_name
norm! gg
- exec '/^}\s*command_complete\[\]\s*=\s*$/+1;/^};/-1yank'
+ exec '/^static keyvalue_T command_complete_tab\[] =$/+1;/^};$/-1yank'
%delete _
put
- g!/^\s*{.*"\w\+"\s*}\s*,.*$/d
+ g!/^\s*KEYVALUE_ENTRY(/d
g/"custom\(list\)\?"/d
for line in getline(1, line('$'))
- let list = matchlist(line, '^\s*{.*"\(\w\+\)"\s*}\s*,')
+ let list = matchlist(line, '^\s*KEYVALUE_ENTRY(EXPAND_\w\+,\s*"\(\w\+\)"')
let item.name = list[1]
call add(a:li, copy(item))
endfor
diff --git a/runtime/syntax/generator/vim.vim.base b/runtime/syntax/generator/vim.vim.base
index adfd68e..2624798 100644
--- a/runtime/syntax/generator/vim.vim.base
+++ b/runtime/syntax/generator/vim.vim.base
@@ -3,7 +3,7 @@
" Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com>
" Doug Kearns <dougkearns@gmail.com>
" URL: https://github.com/vim-jp/syntax-vim-ex
-" Last Change: 2024 Jun 17
+" Last Change: 2024 Aug 23
" Former Maintainer: Charles E. Campbell
" DO NOT CHANGE DIRECTLY.
@@ -29,15 +29,13 @@ syn cluster vimCommentGroup contains=vimTodo,@Spell
" regular vim commands {{{2
" GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR=''
-syn keyword vimCommand contained 2mat[ch] 3mat[ch]
-
" Lower priority for _new_ to distinguish constructors from the command.
syn match vimCommand contained "\<new\>(\@!"
syn match vimCommand contained "\<z[-+^.=]\=\>"
syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue DiffOrig Evaluate Finish Gdb Lfilter Man Over Program Run S Source Step Stop Termdebug TermdebugCommand TOhtml Until Winbar XMLent XMLns
" vimOptions are caught only when contained in a vimSet {{{2
-" GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR=''
+" GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod'
" vimOptions: These are the turn-off setting variants {{{2
" GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR=''
@@ -46,7 +44,7 @@ syn keyword vimStdPlugin contained Arguments Asm Break Cfilter Clear Continue Di
" GEN_SYN_VIM: vimOption invertible, START_STR='syn keyword vimOption contained', END_STR=''
" termcap codes (which can also be set) {{{2
-" GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR=''
+" GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod'
" term key codes
syn keyword vimOption contained t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ku
syn match vimOption contained "t_%1"
@@ -79,7 +77,11 @@ syn case match
"--- syntax here and above generated by mkvimvim ---
" Special Vim Highlighting (not automatic) {{{1
-" Set up folding commands for this syntax highlighting file {{{2
+" Set up commands for this syntax highlighting file {{{2
+
+com! -nargs=* Vim9 execute <q-args> s:vim9script ? "" : "contained"
+com! -nargs=* VimL execute <q-args> s:vim9script ? "contained" : ""
+
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[afhHlmpPrt]'
if g:vimsyn_folding =~# 'a'
com! -nargs=* VimFolda <args> fold
@@ -162,6 +164,14 @@ else
let s:vimsyn_maxlines= 60
endif
+" Nulls {{{2
+" =====
+Vim9 syn keyword vim9Null null null_blob null_channel null_class null_dict null_function null_job null_list null_object null_partial null_string
+
+" Booleans {{{2
+" ========
+Vim9 syn keyword vim9Boolean true false
+
" Numbers {{{2
" =======
syn case ignore
@@ -175,7 +185,8 @@ syn match vimNumber '\%(^\|\A\)\zs#\x\{6}' skipwhite nextgroup=vimGlobal,vimSub
syn case match
" All vimCommands are contained by vimIsCommand. {{{2
-syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCatch,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimMap,vimMark,vimNotFunc,vimNorm,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate
+syn cluster vimCmdList contains=vimAbb,vimAddress,vimAutoCmd,vimAugroup,vimBehave,vimCall,vimCatch,vimConst,vimDef,@vimEcho,vimEnddef,vimEndfunction,vimExecute,vimIsCommand,vimExtCmd,vimFor,vimFunction,vimGlobal,vimHighlight,vimLet,vimLoadkeymap,vimMap,vimMark,vimMatch,vimNotFunc,vimNorm,vimSet,vimSleep,vimSyntax,vimThrow,vimUnlet,vimUnmap,vimUserCmd,vimMenu,vimMenutranslate,@vim9CmdList
+syn cluster vim9CmdList contains=vim9Const,vim9Final,vim9For,vim9Var
syn match vimCmdSep "[:|]\+" skipwhite nextgroup=@vimCmdList,vimSubst1
syn match vimIsCommand "\<\%(\h\w*\|[23]mat\%[ch]\)\>" contains=vimCommand
syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>"
@@ -186,7 +197,8 @@ syn match vimVar "\s\zs&t_k;"
syn match vimFBVar contained "\<[bwglstav]:\h[a-zA-Z0-9#_]*\>"
syn keyword vimCommand contained in
-syn cluster vimExprList contains=vimEnvvar,vimFunc,vimFuncVar,vimNumber,vimOper,vimOperParen,vimLetRegister,vimString,vimVar
+syn cluster vimExprList contains=vimEnvvar,vimFunc,vimNumber,vimOper,vimOperParen,vimLetRegister,vimString,vimVar,@vim9ExprList
+syn cluster vim9ExprList contains=vim9Boolean,vim9Null
" Insertions And Appends: insert append {{{2
" (buftype != nofile test avoids having append, change, insert show up in the command window)
@@ -206,6 +218,10 @@ syn match vimBehave "\<be\%[have]\>" nextgroup=vimBehaveBang,vimBehaveModel,vi
syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite
syn keyword vimBehaveModel contained mswin xterm
+" Call {{{2
+" ====
+syn match vimCall "\<call\=\>" skipwhite nextgroup=vimFunc
+
" Exception Handling {{{2
syn keyword vimThrow th[row] skipwhite nextgroup=@vimExprList
syn keyword vimCatch cat[ch] skipwhite nextgroup=vimCatchPattern
@@ -240,8 +256,8 @@ syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBan
" Operators: {{{2
" =========
-syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar
-syn match vimOper "||\|&&\|[-+*/%.!]" skipwhite nextgroup=vimString,vimSpecFile
+syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,@vimContinue,vim9Comment,vimVar,vimBoolean,vimNull
+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=@vimOperGroup
@@ -256,8 +272,8 @@ syn cluster vimFuncList contains=vimFuncBang,vimFunctionError,vimFuncKey,vimFunc
syn cluster vimDefList contains=vimFuncBang,vimFunctionError,vimDefKey,vimFuncSID,Tag
syn cluster vimFuncBodyCommon contains=@vimCmdList,vimCmplxRepeat,vimContinue,vimCtrlChar,vimDef,vimEnvvar,vimFBVar,vimFunc,vimFunction,vimLetHereDoc,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegister,vimSearch,vimSpecFile,vimString,vimSubst,vimFuncFold
-syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert
-syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment
+syn cluster vimFuncBodyList contains=@vimFuncBodyCommon,vimComment,vimLineComment,vimFuncVar,vimInsert,vimConst,vimLet
+syn cluster vimDefBodyList contains=@vimFuncBodyCommon,vim9Comment,vim9LineComment,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For
syn region vimFuncPattern contained matchgroup=vimOper start="/" end="$" contains=@vimSubstList
syn match vimFunction "\<fu\%[nction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vimFuncPattern contains=vimFuncKey
@@ -277,19 +293,19 @@ syn keyword vimFuncKey contained fu[nction]
syn keyword vimDefKey contained def
syn keyword vimMethodName contained empty len string
-syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipnl nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod contains=vimFuncParam,@vimContinue
-syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipnl nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType contains=vimDefParam,vim9Comment
+syn region vimFuncParams contained matchgroup=Delimiter start="(" skip=+\n\s*\\\|\n\s*"\\ + end=")" skipwhite skipnl nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError contains=vimFuncParam,@vimContinue
+syn region vimDefParams contained matchgroup=Delimiter start="(" end=")" skipwhite skipnl nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType,vimCommentError contains=vimDefParam,vim9Comment,vimFuncParamEquals
syn match vimFuncParam contained "\<\h\w*\>\|\.\.\." skipwhite nextgroup=vimFuncParamEquals
syn match vimDefParam contained "\<\h\w*\>" skipwhite nextgroup=vimParamType,vimFuncParamEquals
syn match vimFuncParamEquals contained "=" skipwhite nextgroup=@vimExprList
-syn match vimFuncMod contained "\<\%(abort\|closure\|dict\|range\)\>" skipwhite skipnl nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod
+syn match vimFuncMod contained "\<\%(abort\|closure\|dict\|range\)\>" skipwhite skipnl nextgroup=vimFuncBody,vimFuncComment,vimEndfunction,vimFuncMod,vim9CommentError
-syn region vimFuncBody contained start="^" matchgroup=vimCommand end="\<endfu\%[nction]\>" contains=@vimFuncBodyList
-syn region vimDefBody contained start="^" matchgroup=vimCommand end="\<enddef\>" contains=@vimDefBodyList
+syn region vimFuncBody contained start="^.\=" matchgroup=vimCommand end="\<endfu\%[nction]\>" contains=@vimFuncBodyList skipwhite nextgroup=vimCmdSep,vimComment,vim9CommentError
+syn region vimDefBody contained start="^.\=" matchgroup=vimCommand end="\<enddef\>" contains=@vimDefBodyList skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError
-syn match vimEndfunction "\<endf\%[unction]\>"
-syn match vimEnddef "\<enddef\>"
+syn match vimEndfunction "\<endf\%[unction]\>" skipwhite nextgroup=vimCmdSep,vimComment,vim9CommentError
+syn match vimEnddef "\<enddef\>" skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError
if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
syn region vimFuncFold start="^\s*:\=\s*fu\%[nction]\>!\=\s*\%(<[sS][iI][dD]>\|[sg]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)\+\s*(" end="^\s*:\=\s*endf\%[unction]\>" contains=vimFunction fold keepend extend transparent
@@ -302,9 +318,9 @@ syn match vimFuncBlank contained "\s\+"
" Types: {{{2
" =====
-" vimTypes : new for vim9
-syn region vimReturnType contained start=":\s" end="$" matchgroup=vim9Comment end="\ze#" skipwhite skipnl nextgroup=vimDefBody,vimDefComment,vimEnddef contains=vimTypeSep transparent
-syn match vimParamType contained ":\s\+\a" skipwhite skipnl nextgroup=vimFuncParamEquals contains=vimTypeSep,@vimType
+
+syn region vimReturnType contained start=":\s" end="$" matchgroup=vim9Comment end="\ze[#"]" skipwhite skipnl nextgroup=vimDefBody,vimDefComment,vimEnddef,vimCommentError contains=vimTypeSep transparent
+syn match vimParamType contained ":\s" skipwhite skipnl nextgroup=@vimType contains=vimTypeSep
syn match vimTypeSep contained ":\s\@=" skipwhite nextgroup=@vimType
syn keyword vimType contained any blob bool channel float job number string void
@@ -331,7 +347,7 @@ else
endif
syn cluster vimKeymapLineComment contains=vim9\=KeymapLineComment
-syn region vimKeymap matchgroup=vimCommand start="\<loadk\%[eymap]\>" end="\%$" contains=vimKeymapStart
+syn region vimLoadkeymap matchgroup=vimCommand start="\<loadk\%[eymap]\>" end="\%$" contains=vimKeymapStart
" Special Filenames, Modifiers, Extension Removal: {{{2
" ===============================================
@@ -379,35 +395,26 @@ if get(g:, "vimsyn_comment_strings", 1)
endif
if s:vim9script
- syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString contained
- syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString contained
- syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString contained
- " Vim9 comments - TODO: might be highlighted while they don't work
- syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString
- syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
- syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
- " Vim9 comment inside expression
- " syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString
- " syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString
- " syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString
-
syn cluster vimComment contains=vim9Comment
else
- syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString
- syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
- syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
- " Vim9 comments - TODO: might be highlighted while they don't work
- syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString contained
- syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString contained
- syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString contained
- " Vim9 comment inside expression
- syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString contained
- syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString contained
- syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString contained
-
syn cluster vimComment contains=vimComment
endif
+VimL syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString
+VimL syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
+VimL syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
+" Vim9 comments - TODO: might be highlighted while they don't work
+Vim9 syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString
+Vim9 syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
+Vim9 syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
+" Vim9 comment inside expression
+Vim9 syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString contained
+Vim9 syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString contained
+Vim9 syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString contained
+
+syn match vim9CommentError contained "#.*"
+syn match vimCommentError contained +".*+
+
" Environment Variables: {{{2
" =====================
syn match vimEnvvar "\$\I\i*"
@@ -434,11 +441,12 @@ syn match vimEscape contained "\\\o\{1,3}\|\\[xX]\x\{1,2}\|\\u\x\{1,4}\|\\U\x\{1
syn match vimEscape contained "\\<" contains=vimNotation
syn match vimEscape contained "\\<\*[^>]*>\=>"
-syn region vimString oneline start=+$'+ skip=+''+ end=+'+ contains=vimStringInterpolationBrace,vimStringInterpolationExpr
-syn region vimString oneline start=+$"+ end=+"+ contains=@vimStringGroup,vimStringInterpolationBrace,vimStringInterpolationExpr
+syn region vimString oneline start=+$'+ skip=+''+ end=+'+ contains=@vimStringInterpolation
+syn region vimString oneline start=+$"+ end=+"+ contains=@vimStringGroup,@vimStringInterpolation
syn region vimStringInterpolationExpr oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList
syn match vimStringInterpolationBrace contained "{{"
syn match vimStringInterpolationBrace contained "}}"
+syn cluster vimStringInterpolation contains=vimStringInterpolationExpr,vimStringInterpolationBrace
" Substitutions: {{{2
" =============
@@ -498,28 +506,45 @@ syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
" Set command and associated set-options (vimOptions) with comment {{{2
-syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\.\n\@!" end="$" end="|" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=vimSetEqual,vimOption,vimErrSetting,@vimComment,vimSetString,vimSetMod
-syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]"me=e-1 end="$" contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar
-syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
+syn match vimSet "\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skipwhite nextgroup=vimSetBang,vimSetRegion
+syn region vimSetRegion contained start="\S" skip=+\\\\\|\\|\|\n\s*\\\|\n\s*["#]\\ + matchgroup=vimCmdSep end="|" end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend contains=@vimComment,@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap
+syn region vimSetEqual contained matchgroup=vimOper start="[=:]\|[-+^]=" skip=+\\\\\|\\|\|\\\s\|\n\s*\\\|\n\s*["#]\\ \|^\s*\\\|^\s*["#]\\ + matchgroup=vimCmdSep end="|" end="\ze\s" end="$" contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep
+syn match vimSetBang contained "\a\@1<=!" skipwhite nextgroup=vimSetAll,vimSetTermcap
+syn keyword vimSetAll contained all nextgroup=vimSetMod
+syn keyword vimSetTermcap contained termcap
+syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar
syn match vimSetSep contained "[,:]"
-syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
+syn match vimSetMod contained "\a\@1<=\%(&vim\=\|[!&?<]\)"
-" Let And Var: {{{2
-" ===========
-syn keyword vimLet let skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc,vimLetRegister,vimVarList
-syn keyword vimConst cons[t] skipwhite nextgroup=vimVar,vimLetHereDoc,vimVarList
-syn region vimVarList contained start="\[" end="]" contains=vimVar,vimContinue
+" Variable Declarations: {{{2
+" =====================
+VimL syn keyword vimLet let skipwhite nextgroup=vimVar,vimFuncVar,vimLetRegister,vimVarList
+VimL syn keyword vimConst cons[t] skipwhite nextgroup=vimVar,vimVarList
+syn region vimVarList contained start="\[" end="]" contains=vimVar,@vimContinue
-syn keyword vimUnlet unl[et] skipwhite nextgroup=vimUnletBang,vimUnletVars
+VimL syn keyword vimUnlet unl[et] skipwhite nextgroup=vimUnletBang,vimUnletVars
syn match vimUnletBang contained "!" skipwhite nextgroup=vimUnletVars
syn region vimUnletVars contained start="$\I\|\h" skip="\n\s*\\" end="$" end="|" contains=vimVar,vimEnvvar,vimContinue,vimString,vimNumber
-VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s*\%(trim\s\+\%(eval\s\+\)\=\|eval\s\+\%(trim\s\+\)\=\)\=\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' extend
-syn keyword vimLet var skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
+VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='\%(^\z(\s*\)\S.*\)\@<==<<\s*trim\%(\s\+\)\@>\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\z1\=\z2$' extend
+VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\%(\s*\)\@>\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\z1$' extend
+VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='\%(^\z(\s*\)\S.*\)\@<==<<\s*\%(trim\s\+eval\|eval\s\+trim\)\%(\s\+\)\@>\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\z1\=\z2$' contains=@vimStringInterpolation extend
+VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s*eval\%(\s\+\)\@>\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\z1$' contains=@vimStringInterpolation extend
+
+Vim9 syn keyword vim9Const const skipwhite nextgroup=vim9Variable,vim9VariableList
+Vim9 syn keyword vim9Final final skipwhite nextgroup=vim9Variable,vim9VariableList
+Vim9 syn keyword vim9Var var skipwhite nextgroup=vim9Variable,vim9VariableList
+
+syn match vim9Variable contained "\<\h\w*\>" skipwhite nextgroup=vimTypeSep,vimLetHereDoc
+syn region vim9VariableList contained start="\[" end="]" contains=vim9Variable,@vimContinue
" For: {{{2
" ===
-syn keyword vimFor for skipwhite nextgroup=vimVar,vimVarList
+if s:vim9script
+ syn keyword vim9For for skipwhite nextgroup=vim9Variable,vim9VariableList
+else
+ syn keyword vimFor for skipwhite nextgroup=vimVar,vimVarList
+endif
" Abbreviations: {{{2
" =============
@@ -561,12 +586,14 @@ syn region vimExecute matchgroup=vimCommand start="\<exe\%[cute]\>" skip=+\\|\|\
" Maps: {{{2
" ====
-syn match vimMap "\<map\>\ze\s*(\@!" skipwhite nextgroup=vimMapMod,vimMapLhs
-syn match vimMap "\<map!" contains=vimMapBang skipwhite nextgroup=vimMapMod,vimMapLhs
-" GEN_SYN_VIM: vimCommand map, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs'
+" GEN_SYN_VIM: vimCommand map, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs'
+syn match vimMap "\<map\>" skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
+syn keyword vimMap no[remap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
" GEN_SYN_VIM: vimCommand mapclear, START_STR='syn keyword vimMap', END_STR='skipwhite nextgroup=vimMapMod'
-syn keyword vimMap mapc[lear] skipwhite nextgroup=vimMapBang,vimMapMod
-" GEN_SYN_VIM: vimCommand unmap, START_STR='syn keyword vimUnmap', END_STR='skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs'
+syn keyword vimMap mapc[lear] skipwhite nextgroup=vimMapBang,vimMapMod
+" GEN_SYN_VIM: vimCommand unmap, START_STR='syn keyword vimUnmap', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs'
+syn keyword vimUnmap unm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
+
syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation skipwhite nextgroup=vimMapRhs
syn match vimMapLhs contained "\%(.\|\S\)\+\ze\s*$" contains=vimCtrlChar,vimNotation skipwhite skipnl nextgroup=vimMapRhsContinue
syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs
@@ -632,6 +659,8 @@ syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\
syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%(\w\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation,vimMethodName
syn keyword vimFuncEcho contained ec ech echo
+syn match vimMap "\<map\%(\s\+(\)\@=" skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs
+
" User Command Highlighting: {{{2
syn match vimUsrCmd '^\s*\zs\u\%(\w*\)\@>\%([(#[]\|\s\+\%([-+*/%]\=\|\.\.\)=\)\@!'
@@ -649,6 +678,15 @@ endif
syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<retu\%[rn]\>\|\<while\>" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation
+" Match: {{{2
+" =====
+syn match vimMatch "\<[23]\=mat\%[ch]\>" skipwhite nextgroup=vimMatchGroup,vimMatchNone
+syn match vimMatchGroup contained "[[:alnum:]._-]\+" skipwhite nextgroup=vimMatchPattern
+syn case ignore
+syn keyword vimMatchNone contained none
+syn case match
+syn region vimMatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline
+
" Norm: {{{2
" ====
syn match vimNorm "\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds
@@ -824,13 +862,9 @@ syn match vimCtrlChar "[- -]"
" Beginners - Patterns that involve ^ {{{2
" =========
-if s:vim9script
- syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle
- syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle contained
-else
- syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle
- syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle contained
-endif
+Vim9 syn region vim9LineComment start=+^[ \t:]*\zs#.*$+ skip=+\n\s*\\\|\n\s*#\\ + end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle
+VimL syn region vimLineComment start=+^[ \t:]*\zs".*$+ skip=+\n\s*\\\|\n\s*"\\ + end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle
+
syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup
@@ -898,12 +932,16 @@ if (g:vimsyn_embed =~# 'l' && has("lua")) && filereadable(s:luapath)
unlet! b:current_syntax
syn cluster vimFuncBodyList add=vimLuaRegion
exe "syn include @vimLuaScript ".s:luapath
- VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript
- VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript
+ VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+^\z(\s*\)lua\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimLuaScript
+ VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimLuaScript
+ VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+^\z(\s*\)lua\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimLuaScript
+ VimFoldl syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+^\.$+ contains=@vimLuaScript
syn cluster vimFuncBodyList add=vimLuaRegion
else
- syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+
+ syn region vimEmbedError start=+^\z(\s*\)lua\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+
+ syn region vimEmbedError start=+lua\s*<<\s*\z(\S*\)+ end=+^\z1$+
+ syn region vimEmbedError start=+^\z(\s*\)lua\s*<<\s*trim\s\*$+ end=+^\z1\.$+
+ syn region vimEmbedError start=+lua\s*<<\s*$+ end=+^\.$+
endif
unlet s:luapath
@@ -921,12 +959,16 @@ if (g:vimsyn_embed =~# 'p' && has("perl")) && filereadable(s:perlpath)
unlet! b:current_syntax
syn cluster vimFuncBodyList add=vimPerlRegion
exe "syn include @vimPerlScript ".s:perlpath
- VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(\S*\)\ze\(\s*["#].*\)\=$+ end=+^\z1\ze\(\s*[#"].*\)\=$+ contains=@vimPerlScript
- VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript
+ VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimPerlScript
+ VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimPerlScript
+ VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimPerlScript
+ VimFoldp syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript
syn cluster vimFuncBodyList add=vimPerlRegion
else
- syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+\.$+
+ syn region vimEmbedError start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+
+ syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(\S*\)+ end=+^\z1$+
+ syn region vimEmbedError start=+^\z(\s*\)pe\%[rl]\s*<<\s*trim\s\*$+ end=+^\z1\.$+
+ syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+^\.$+
endif
unlet s:perlpath
@@ -944,12 +986,16 @@ if (g:vimsyn_embed =~# 'r' && has("ruby")) && filereadable(s:rubypath)
syn cluster vimFuncBodyList add=vimRubyRegion
unlet! b:current_syntax
exe "syn include @vimRubyScript ".s:rubypath
- VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimRubyScript
- syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript
+ VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimRubyScript
+ VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub\%[y]\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimRubyScript
+ VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimRubyScript
+ VimFoldr syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub\%[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript
syn cluster vimFuncBodyList add=vimRubyRegion
else
- syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+rub[y]\s*<<\s*$+ end=+\.$+
+ syn region vimEmbedError start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+
+ syn region vimEmbedError start=+rub\%[y]\s*<<\s*\z(\S.*\)+ end=+^\z1$+
+ syn region vimEmbedError start=+^\z(\s*\)rub\%[y]\s*<<\s*trim\s\*$+ end=+^\z1\.$+
+ syn region vimEmbedError start=+rub\%[y]\s*<<\s*$+ end=+^\.$+
endif
unlet s:rubypath
@@ -967,14 +1013,18 @@ if g:vimsyn_embed =~# 'P' && has("pythonx") && filereadable(s:pythonpath)
unlet! b:current_syntax
syn cluster vimFuncBodyList add=vimPythonRegion
exe "syn include @vimPythonScript ".s:pythonpath
- VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\%(trim\s*\)\=\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
- VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\%(trim\s*\)\=$+ end=+\.$+ contains=@vimPythonScript
- VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\%(trim\s*\)\=\z(\S*\)\ze\(\s*#.*\)\=$+ end=+^\z1\ze\(\s*".*\)\=$+ contains=@vimPythonScript
- VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\=\s*<<\s*\%(trim\s*\)\=$+ end=+\.$+ contains=@vimPythonScript
+ VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimPythonScript
+ VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*\z(\S\+\)+ end=+^\z1$+ contains=@vimPythonScript
+ VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimPythonScript
+ VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon][3x]\=\s*<<\s*$+ end=+^\.$+ contains=@vimPythonScript
+ VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\%(trim\s*\)\=\z(\S\+\)+ end=+^\z1$+ contains=@vimPythonScript
+ VimFoldP syn region vimPythonRegion matchgroup=vimScriptDelim start=+Py\%[thon]2or3\s*<<\s*\%(trim\s*\)\=$+ end=+^\.$+ contains=@vimPythonScript
syn cluster vimFuncBodyList add=vimPythonRegion
else
- syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+
+ syn region vimEmbedError start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+
+ syn region vimEmbedError start=+py\%[thon][3x]\=\s*<<\s*\z(\S\+\)+ end=+^\z1$+
+ syn region vimEmbedError start=+^\z(\s*\)py\%[thon][3x]\=\s*<<\s*trim\s*$+ end=+^\z1\.$+
+ syn region vimEmbedError start=+py\%[thon][3x]\=\s*<<\s*$+ end=+^\.$+
endif
unlet s:pythonpath
@@ -999,17 +1049,23 @@ if s:trytcl
unlet! b:current_syntax
syn cluster vimFuncBodyList add=vimTclRegion
exe "syn include @vimTclScript ".s:tclpath
- VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript
- VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript
+ VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimTclScript
+ VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc\%[l]\=\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimTclScript
+ VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimTclScript
+ VimFoldt syn region vimTclRegion matchgroup=vimScriptDelim start=+tc\%[l]\=\s*<<\s*$+ end=+^\.$+ contains=@vimTclScript
syn cluster vimFuncBodyList add=vimTclScript
else
- syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
+ syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+
+ syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*\z(\S*\)+ end=+^\z1$+
+ syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\*$+ end=+^\z1\.$+
+ syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*$+ end=+^\.$+
endif
unlet s:tclpath
else
- syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+
+ syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+
+ syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*\z(\S*\)+ end=+^\z1$+
+ syn region vimEmbedError start=+^\z(\s*\)tc\%[l]\s*<<\s*trim\s\*$+ end=+^\z1\.$+
+ syn region vimEmbedError start=+tc\%[l]\=\s*<<\s*$+ end=+^\.$+
endif
unlet s:trytcl
@@ -1030,12 +1086,16 @@ if (g:vimsyn_embed =~# 'm' && has("mzscheme")) && filereadable(s:mzschemepath)
exe "syn include @vimMzSchemeScript ".s:mzschemepath
let &isk= s:iskKeep
unlet s:iskKeep
- VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript
- VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript
+ VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+ contains=@vimMzSchemeScript
+ VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(\S*\)+ end=+^\z1$+ contains=@vimMzSchemeScript
+ VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s*$+ end=+^\z1\.$+ contains=@vimMzSchemeScript
+ VimFoldm syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+^\.$+ contains=@vimMzSchemeScript
syn cluster vimFuncBodyList add=vimMzSchemeRegion
else
- syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+
- syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+
+ syn region vimEmbedError start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s\+\z(\S\+\)+ end=+^\z1\z2$+
+ syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(\S*\)+ end=+^\z1$+
+ syn region vimEmbedError start=+^\z(\s*\)mz\%[scheme]\s*<<\s*trim\s\*$+ end=+^\z1\.$+
+ syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+^\.$+
endif
unlet s:mzschemepath
@@ -1073,7 +1133,6 @@ if !exists("skip_vim_syntax_inits")
hi def link vimBufnrWarn vimWarn
endif
- hi def link vim9Vim9ScriptArg Special
hi def link vimAbb vimCommand
hi def link vimAddress vimMark
hi def link vimAugroupBang vimBang
@@ -1087,20 +1146,20 @@ if !exists("skip_vim_syntax_inits")
hi def link vimBehaveModel vimBehave
hi def link vimBehave vimCommand
hi def link vimBracket Delimiter
+ hi def link vimCall vimCommand
hi def link vimCatch vimCommand
hi def link vimCmplxRepeat SpecialChar
hi def link vimCommand Statement
hi def link vimComment Comment
- hi def link vim9Comment Comment
+ hi def link vimCommentError vimError
hi def link vimCommentString vimString
hi def link vimCommentTitle PreProc
- hi def link vim9CommentTitle PreProc
hi def link vimCondHL vimCommand
hi def link vimConst vimCommand
hi def link vimContinue Special
hi def link vimContinueComment vimComment
hi def link vimCtrlChar SpecialChar
- hi def link vimDefComment vimComment
+ hi def link vimDefComment vim9Comment
hi def link vimDefKey vimCommand
hi def link vimDefParam vimVar
hi def link vimEcho vimCommand
@@ -1161,13 +1220,15 @@ if !exists("skip_vim_syntax_inits")
hi def link vimLetHereDocStop Special
hi def link vimLetRegister Special
hi def link vimLineComment vimComment
- hi def link vim9LineComment vimComment
hi def link vimMapBang vimBang
hi def link vimMapModKey vimFuncSID
hi def link vimMapMod vimBracket
hi def link vimMap vimCommand
hi def link vimMark Number
hi def link vimMarkNumber vimNumber
+ hi def link vimMatch vimCommand
+ hi def link vimMatchGroup vimGroup
+ hi def link vimMatchNone vimGroup
hi def link vimMenuBang vimBang
hi def link vimMenuClear Special
hi def link vimMenuMod vimMapMod
@@ -1201,10 +1262,13 @@ if !exists("skip_vim_syntax_inits")
hi def link vimSearchDelim Statement
hi def link vimSearch vimString
hi def link vimSep Delimiter
+ hi def link vimSet vimCommand
+ hi def link vimSetAll vimOption
+ hi def link vimSetBang vimBang
hi def link vimSetMod vimOption
- hi def link vimSetSep Statement
+ hi def link vimSetSep vimSep
hi def link vimSetString vimString
- hi def link vim9Vim9Script vimCommand
+ hi def link vimSetTermcap vimOption
hi def link vimShebang PreProc
hi def link vimSleep vimCommand
hi def link vimSleepArg Constant
@@ -1265,6 +1329,20 @@ if !exists("skip_vim_syntax_inits")
hi def link vimUserFunc Normal
hi def link vimVar Identifier
hi def link vimWarn WarningMsg
+
+ hi def link vim9Boolean Boolean
+ hi def link vim9Comment Comment
+ hi def link vim9CommentError vimError
+ hi def link vim9CommentTitle PreProc
+ hi def link vim9Const vimCommand
+ hi def link vim9Final vimCommand
+ hi def link vim9For vimCommand
+ hi def link vim9LineComment vimComment
+ hi def link vim9Null Constant
+ hi def link vim9Var vimCommand
+ hi def link vim9Variable vimVar
+ hi def link vim9Vim9Script vimCommand
+ hi def link vim9Vim9ScriptArg Special
endif
" Current Syntax Variable: {{{2
@@ -1272,6 +1350,8 @@ let b:current_syntax = "vim"
" ---------------------------------------------------------------------
" Cleanup: {{{1
+delc Vim9
+delc VimL
delc VimFolda
delc VimFoldf
delc VimFoldh