vim.vim.base (166076B)
1 " Vim syntax file 2 " Language: Vim script 3 " Maintainer: Hirohito Higashi <h.east.727 ATMARK gmail.com> 4 " Doug Kearns <dougkearns@gmail.com> 5 " Last Change: 2026 Sep 20 6 " Former Maintainer: Charles E. Campbell 7 8 " DO NOT CHANGE DIRECTLY. 9 " THIS FILE PARTLY GENERATED BY gen_syntax_vim.vim. 10 " (Search string "GEN_SYN_VIM:" in this file) 11 12 " Quit when a syntax file was already loaded {{{1 13 if exists("b:current_syntax") 14 finish 15 endif 16 let s:keepcpo= &cpo 17 set cpo&vim 18 19 " Feature testing {{{1 20 21 " NOTE: vimsyn_force_vim9script and vimsyn_force_cmdline_window for internal use only 22 let s:vim9script = get(b:, "vimsyn_force_vim9script", v:false) || "\n" .. getline(1, 32)->join("\n") =~# '\nvim9s\%[cript]\>' 23 24 let s:cmdline_window = get(b:, "vimsyn_force_cmdline_window", v:false) || win_gettype() ==# "command" 25 26 function s:has(feature) 27 return has(a:feature) || index(get(g:, "vimsyn_vim_features", []), a:feature) != -1 28 endfunction 29 30 " Automatically generated keyword lists: {{{1 31 32 " vimTodo: contains common special-notices for comments {{{2 33 " Use the vimCommentGroup cluster to add your own. 34 syn keyword vimTodo contained COMBAK FIXME TODO XXX 35 syn cluster vimCommentGroup contains=vimTodo,@Spell 36 37 " regular vim commands {{{2 38 " GEN_SYN_VIM: vimCommand normal, START_STR='syn keyword vimCommand contained', END_STR='nextgroup=vimBang' 39 40 " lower priority :syn-match to allow for :command/function() distinction 41 " :chdir and :delete is handled specially elsewhere 42 syn match vimCommand contained "\<co\%[py]\>" nextgroup=vimBang 43 syn match vimCommand_ contained "co\%[py]\>" nextgroup=vimBang 44 syn match vimCommand contained "\<j\%[oin]\>" nextgroup=vimBang 45 syn match vimCommand_ contained "j\%[oin]\>" nextgroup=vimBang 46 syn match vimCommand contained "\<sp\%[lit]\>" nextgroup=vimBang 47 syn match vimCommand_ contained "sp\%[lit]\>" nextgroup=vimBang 48 syn match vimCommand contained "\<sw\%[apname]\>" nextgroup=vimBang 49 50 " commands starting with uppercase letter 51 syn keyword vimCommand contained N[ext] nextgroup=vimBang 52 syn match vimCommand_ contained "N\%[ext]\>" nextgroup=vimBang 53 syn keyword vimCommand contained P[rint] 54 syn match vimCommand_ contained "P\%[rint]\>" 55 syn keyword vimCommand contained X 56 57 " GEN_SYN_VIM: vimCommand modifier, START_STR='syn keyword vimCommandModifier contained', END_STR='skipwhite skipnl nextgroup=vimCommandModifierBang,@vimCommandModifierContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func' 58 " modifiers supporting bang, :filter is handled specially elsewhere 59 syn keyword vimCommandModifier contained sil[ent] skipwhite skipnl nextgroup=vimCommandModifierBang,@vimCommandModifierContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func 60 61 syn match vimCommandModifierBang contained "\a\@1<=!" skipwhite skipnl nextgroup=@vimCommandModifierContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func 62 63 " lower priority :syn-match to allow for :command/function() distinction 64 syn match vimCommandModifier contained "\<bro\%[wse]\>" skipwhite skipnl nextgroup=vimCommandModifierBang,@vimCommandModifierContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func 65 syn match vimCommandModifier contained "\<conf\%[irm]\>" skipwhite skipnl nextgroup=vimCommandModifierBang,@vimCommandModifierContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func 66 67 syn match vimCommandModifierContinue contained "^\s*\\" skipwhite skipnl nextgroup=@vimCommandModifierContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func contains=vimLeadingWhitespace 68 syn match vimCommandModifierContinueComment contained '^\s*["#]\\ .*' skipwhite skipnl nextgroup=@vimCommandModifierContinue contains=vimLeadingWhitespace 69 syn cluster vimCommandModifierContinue contains=vimCommandModifierContinue,vimCommandModifierContinueComment 70 71 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 72 73 " vimOptions are caught only when contained in a vimSet {{{2 74 " GEN_SYN_VIM: vimOption normal, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' 75 76 " vimOptions: These are the turn-off setting variants {{{2 77 " GEN_SYN_VIM: vimOption turn-off, START_STR='syn keyword vimOption contained', END_STR='' 78 79 " vimOptions: These are the invertible variants {{{2 80 " GEN_SYN_VIM: vimOption invertible, START_STR='syn keyword vimOption contained', END_STR='' 81 " termcap codes (which can also be set) {{{2 82 " GEN_SYN_VIM: vimOption term output code, START_STR='syn keyword vimOption contained', END_STR='skipwhite nextgroup=vimSetEqual,vimSetMod' 83 " term key codes 84 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 85 syn match vimOption contained "t_%1" 86 syn match vimOption contained "t_#2" 87 syn match vimOption contained "t_#4" 88 syn match vimOption contained "t_@7" 89 syn match vimOption contained "t_*7" 90 syn match vimOption contained "t_&8" 91 syn match vimOption contained "t_%i" 92 syn match vimOption contained "t_k;" 93 94 " vimOptions: These are the variable names {{{2 95 " GEN_SYN_VIM: vimOption normal variable, START_STR='syn keyword vimOptionVarName contained', END_STR='' 96 " GEN_SYN_VIM: vimOption term output code variable, START_STR='syn keyword vimOptionVarName contained', END_STR='' 97 syn keyword vimOptionVarName 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 98 syn match vimOptionVarName contained "t_%1" 99 syn match vimOptionVarName contained "t_#2" 100 syn match vimOptionVarName contained "t_#4" 101 syn match vimOptionVarName contained "t_@7" 102 syn match vimOptionVarName contained "t_*7" 103 syn match vimOptionVarName contained "t_&8" 104 syn match vimOptionVarName contained "t_%i" 105 syn match vimOptionVarName contained "t_k;" 106 107 " unsupported settings: some were supported by vi but don't do anything in vim {{{2 108 " GEN_SYN_VIM: Missing vimOption, START_STR='syn keyword vimErrSetting contained', END_STR='' 109 110 " AutoCmd Events {{{2 111 syn case ignore 112 " GEN_SYN_VIM: vimAutoEvent, START_STR='syn keyword vimAutoEvent contained', END_STR='skipwhite nextgroup=vimAutoEventSep,@vimAutocmdPattern' 113 114 syn keyword vimAutoEvent contained User skipwhite nextgroup=vimUserAutoEvent 115 syn match vimUserAutoEvent contained "\<\h\w*\>" skipwhite skipnl nextgroup=vimUserAutoEventSep,vimAutocmdMod,vimAutocmdBlock,@vimAutocmdContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func,@vimFunc 116 117 " Highlight commonly used Groupnames {{{2 118 " GEN_SYN_VIM: vimGroup, START_STR='syn keyword vimGroup contained', END_STR='' 119 120 " Default highlighting groups {{{2 121 " GEN_SYN_VIM: vimHLGroup, START_STR='syn keyword vimHLGroup contained', END_STR='' 122 syn match vimHLGroup contained "\<Conceal\>" 123 syn case match 124 125 " Function Names {{{2 126 " GEN_SYN_VIM: vimFuncName, START_STR='syn keyword vimFuncName contained', END_STR='' 127 128 " Predefined variable names {{{2 129 " GEN_SYN_VIM: vimVarName, START_STR='syn keyword vimVimVarName contained', END_STR='' 130 131 "--- syntax here and above generated by runtime/syntax/generator/gen_syntax_vim.vim --- 132 133 " Special Vim Highlighting (not automatic) {{{1 134 135 " Neovim keyword list additions {{{2 136 137 if s:has("nvim") 138 syn keyword vimOptionVarName contained channel inccommand mousescroll pumblend redrawdebug scrollback shada shadafile statuscolumn termpastefilter termsync winbar winblend winhighlight 139 syn keyword vimFuncName contained api_info buffer_exists buffer_name buffer_number chanclose chansend ctxget ctxpop ctxpush ctxset ctxsize dictwatcheradd dictwatcherdel file_readable highlight_exists highlightID jobclose jobpid jobresize jobsend jobstart jobstop jobwait last_buffer_nr menu_get msgpackdump msgpackparse reg_recorded rpcnotify rpcrequest rpcstart rpcstop serverstart serverstop sockconnect stdioopen stdpath termopen test_write_list_log wait 140 syn match vimFuncName contained "\<nvim_\w\+\>" 141 syn keyword vimVimVarName contained lua msgpack_types relnum stderr termrequest virtnum 142 endif 143 144 " Set up commands for this syntax highlighting file {{{2 145 146 com! -nargs=* Vim9 execute <q-args> s:vim9script ? "" : "contained" 147 com! -nargs=* VimL execute <q-args> s:vim9script ? "contained" : "" 148 149 com! -nargs=* VimExtend execute <q-args> s:cmdline_window ? "" : "extend" 150 151 if exists("g:vimsyn_folding") && g:vimsyn_folding =~# '[acefhiHlmpPrt]' 152 if g:vimsyn_folding =~# 'a' 153 com! -nargs=* VimFolda <args> fold 154 else 155 com! -nargs=* VimFolda <args> 156 endif 157 if g:vimsyn_folding =~# 'c' 158 com! -nargs=* VimFoldc <args> fold 159 else 160 com! -nargs=* VimFoldc <args> 161 endif 162 if g:vimsyn_folding =~# 'e' 163 com! -nargs=* VimFolde <args> fold 164 else 165 com! -nargs=* VimFolde <args> 166 endif 167 if g:vimsyn_folding =~# 'f' 168 com! -nargs=* VimFoldf <args> fold 169 else 170 com! -nargs=* VimFoldf <args> 171 endif 172 if g:vimsyn_folding =~# 'h' 173 com! -nargs=* VimFoldh <args> fold 174 else 175 com! -nargs=* VimFoldh <args> 176 endif 177 if g:vimsyn_folding =~# 'H' 178 com! -nargs=* VimFoldH <args> fold 179 else 180 com! -nargs=* VimFoldH <args> 181 endif 182 if g:vimsyn_folding =~# 'i' 183 com! -nargs=* VimFoldi <args> fold 184 else 185 com! -nargs=* VimFoldi <args> 186 endif 187 if g:vimsyn_folding =~# 'l' 188 com! -nargs=* VimFoldl <args> fold 189 else 190 com! -nargs=* VimFoldl <args> 191 endif 192 if g:vimsyn_folding =~# 'm' 193 com! -nargs=* VimFoldm <args> fold 194 else 195 com! -nargs=* VimFoldm <args> 196 endif 197 if g:vimsyn_folding =~# 'p' 198 com! -nargs=* VimFoldp <args> fold 199 else 200 com! -nargs=* VimFoldp <args> 201 endif 202 if g:vimsyn_folding =~# 'P' 203 com! -nargs=* VimFoldP <args> fold 204 else 205 com! -nargs=* VimFoldP <args> 206 endif 207 if g:vimsyn_folding =~# 'r' 208 com! -nargs=* VimFoldr <args> fold 209 else 210 com! -nargs=* VimFoldr <args> 211 endif 212 if g:vimsyn_folding =~# 't' 213 com! -nargs=* VimFoldt <args> fold 214 else 215 com! -nargs=* VimFoldt <args> 216 endif 217 else 218 com! -nargs=* VimFolda <args> 219 com! -nargs=* VimFoldc <args> 220 com! -nargs=* VimFolde <args> 221 com! -nargs=* VimFoldf <args> 222 com! -nargs=* VimFoldi <args> 223 com! -nargs=* VimFoldh <args> 224 com! -nargs=* VimFoldH <args> 225 com! -nargs=* VimFoldl <args> 226 com! -nargs=* VimFoldm <args> 227 com! -nargs=* VimFoldp <args> 228 com! -nargs=* VimFoldP <args> 229 com! -nargs=* VimFoldr <args> 230 com! -nargs=* VimFoldt <args> 231 endif 232 233 " Deprecated variable options {{{2 234 if exists("g:vim_minlines") 235 let g:vimsyn_minlines= g:vim_minlines 236 endif 237 if exists("g:vim_maxlines") 238 let g:vimsyn_maxlines= g:vim_maxlines 239 endif 240 if exists("g:vimsyntax_noerror") 241 let g:vimsyn_noerror= g:vimsyntax_noerror 242 endif 243 244 " Nulls {{{2 245 " ===== 246 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 null_tuple 247 248 " Booleans {{{2 249 " ======== 250 Vim9 syn keyword vim9Boolean true false 251 252 " Numbers {{{2 253 " ======= 254 syn case ignore 255 syn match vimNumber "\<\d\+\%('\d\+\)*" skipwhite nextgroup=@vimComment,vimSubscriptBrackets 256 syn match vimNumber "\<\d\+\%('\d\+\)*\.\d\+\%(e[+-]\=\d\+\)\=" skipwhite nextgroup=@vimComment 257 syn match vimNumber "\<0b[01]\+\%('[01]\+\)*" skipwhite nextgroup=@vimComment,vimSubscriptBrackets 258 syn match vimNumber "\<0o\=\o\+\%('\o\+\)*" skipwhite nextgroup=@vimComment,vimSubscriptBrackets 259 syn match vimNumber "\<0x\x\+\%('\x\+\)*" skipwhite nextgroup=@vimComment,vimSubscriptBrackets 260 syn match vimNumber '\<0z\>' skipwhite nextgroup=@vimComment 261 syn match vimNumber '\<0z\%(\x\x\)\+\%(\.\%(\x\x\)\+\)*' skipwhite nextgroup=@vimComment,vimSubscriptBrackets 262 syn case match 263 264 " Variables {{{2 265 " ========= 266 syn region vimSubscriptBrackets contained 267 \ matchgroup=vimSubscriptBracket 268 \ start="\[" 269 \ end="]" 270 \ nextgroup=vimSubscriptBrackets,vimSubscriptDot 271 \ contains=@vimExprList 272 syn match vimSubscriptDot contained "\." nextgroup=vimVar,vimVarKey,vimUserFunc,vimUserFuncKey 273 274 syn match vimVar contained "\<\h\w*\>" nextgroup=vimSubscriptBrackets,vimSubscriptDot contains=vim9Super,vim9This 275 " dict-key only 276 syn match vimVarKey contained "\<\d\w*\>" nextgroup=vimSubscriptBrackets,vimSubscriptDot 277 syn match vimVar "\<[bwglstav]:\h\w*\>" nextgroup=vimSubscriptBrackets,vimSubscriptDot contains=vimVarScope 278 " autoload prefix 279 syn match vimVar 280 \ "\<\%(g:\)\=\h\w*\%(#\w\+\)\+\>" nextgroup=vimSubscriptBrackets,vimSubscriptDot contains=vimVarScope 281 syn match vimVar "\<a:\%(000\|1\=[0-9]\|20\)\>" nextgroup=vimSubscriptBrackets,vimSubscriptDot contains=vimVarScope 282 syn match vimFBVar contained "\<[bwglsta]:\h\w*\>" nextgroup=vimSubscriptBrackets,vimSubscriptDot contains=vimVarScope 283 " autoload prefix 284 syn match vimFBVar contained 285 \ "\<\%(g:\)\=\h\w*\%(#\w\+\)\+\>" nextgroup=vimSubscriptBrackets,vimSubscriptDot contains=vimVarScope 286 287 " match the scope prefix independently of the retrofitted scope dictionary 288 syn match vimVarScope contained "\<[bwglstav]:" 289 syn match vimVimVar contained "\<[bwglstav]:\%(\h\|\d\)\@!" nextgroup=vimSubscriptBrackets,vimSubscriptDot 290 291 syn match vimVarNameError contained "\<\h\w*\>" nextgroup=vimSubscriptBrackets,vimSubscriptDot " TODO: just abort highlighting rather than match nextgroup? 292 syn match vimVimVar "\<v:" nextgroup=vimSubscriptBrackets,vimSubscriptDot,vimVimVarName,vimVarNameError 293 syn match vimOptionVar "&\%([lg]:\)\=" nextgroup=vimSubscriptBrackets,vimSubscriptDot,vimOptionVarName,vimVarNameError 294 syn cluster vimSpecialVar contains=vimEnvvar,vimLetRegister,vimOptionVar,vimVimVar 295 296 Vim9 syn match vimVar contained "\<\h\w*\ze<" nextgroup=vim9TypeArgs 297 298 syn cluster vimExprList contains=@vimSpecialVar,@vimFunc,vimNumber,vimOper,vimOperParen,vimLambda,vimString,vimVar,@vim9ExprList 299 syn cluster vim9ExprList contains=vim9Boolean,vim9LambdaParams,vim9Null 300 301 " Commands {{{2 302 syn cluster vimCmdList contains=@vim9CmdList,@vimExUserCmdList,vimAbb,vimAt,vimAugroup,vimAutocmd,vimBehave,vimBreakadd,vimBreakdel,vimBreaklist,vimBuffer,vimCall,vimCatch,vimCd,vimCommand,vimCommandModifier,vimConst,vimCopy,vimDebug,vimDebuggreedy,vimDef,vimDefFold,vimDefer,vimDelcommand,vimDelete,vimDelfunction,vimDoCommand,vimDoautocmd,vimTextInputFold,@vimEcho,vimElse,vimElseif,vimEnddef,vimEndfunction,vimEndif,vimEquals,vimEval,vimExFilter,vimExecute,vimExtCmd,vimFiletype,vimFor,vimFunction,vimFunctionFold,vimGlobal,vimGrep,vimGrepadd,vimHelp,vimHelpgrep,vimHighlight,vimHistory,vimIf,vimImport,vimLanguage,vimLet,vimLoadkeymap,vimLockvar,vimLua,vimMake,vimMap,vimMark,vimMatch,vimMenu,vimMenutranslate,vimMzScheme,vimNormal,vimPackadd,vimPerl,vimPound,vimProfdel,vimProfile,vimPrompt,vimPython,vimPython3,vimPythonX,vimRedir,vimReturn,vimRuby,vimRuntime,vimSet,vimShiftLeft,vimShiftRight,vimSleep,vimSort,vimSubst,vimSynColor,vimSynLink,vimSyntax,vimSyntime,vimTcl,vimTerminal,vimThrow,vimUniq,vimUnlet,vimUnlockvar,vimUnmap,vimUserCmd,vimUsrCmd,vimVimgrep,vimVimgrepadd,vimWhile,vimWincmd,vimWrite 303 syn cluster vim9CmdList contains=vim9Abstract,vim9ClassBody,vim9Const,vim9EnumBody,vim9Export,vim9Final,vim9For,vim9InterfaceBody,vim9Type,vim9Var,vim9Wincmd 304 305 syn match vimCmdStart contained ":\+" skipwhite nextgroup=vimCmdStart,@vimRange,@vimCmdList,vimComment 306 syn match vimCount contained "\d\+" 307 syn match vimBang contained "!" 308 syn match vimPrintFlag contained "[lp#]" skipwhite nextgroup=vimPrintFlag,vimComment,vimCmdSep 309 310 syn match vimWhitespace contained "\s\+" 311 syn match vimLeadingWhitespace contained "^\s\+" 312 313 " :range {{{3 314 syn match vimRange contained "[*%]" skipwhite nextgroup=vimAddressOffset,vimAddressSeparator,vimCmdStart,@vimCmdList,vimCommand 315 316 syn region vimAddressPattern contained 317 \ matchgroup=Delimiter 318 \ start="/" 319 \ skip=+\\/\|\n\s*\%(\\\|["#]\\ \)+ 320 \ end="$" 321 \ end="/" 322 \ skipwhite nextgroup=vimAddressOffset,vimAddressSeparator,vimCmdStart,@vimCmdList,vimCommand 323 \ contains=vimAddressSlashEscape,@vimContinue,@vimSubstList 324 syn match vimAddressSlashEscape contained "\\/" 325 syn region vimAddressPattern contained 326 \ matchgroup=Delimiter 327 \ start="?" 328 \ skip=+\\?\|\n\s*\%(\\\|["#]\\ \)+ 329 \ end="$" 330 \ end="?" 331 \ skipwhite nextgroup=vimAddressOffset,vimAddressSeparator,vimCmdStart,@vimCmdList,vimCommand 332 \ contains=vimAddressQuestionEscape,@vimContinue,@vimSubstList 333 syn match vimAddressQuestionEscape contained "\\?" 334 335 syn match vimAddressOffset contained "[+-]\%(\d\+\)\=\|\d\+" skipwhite nextgroup=vimAddressOffset,vimAddressSeparator,vimCmdStart,@vimCmdList,@vimCommand_ 336 syn match vimAddress contained "\%#=1\d\+" skipwhite nextgroup=vimAddressOffset,vimAddressSeparator,vimCmdStart,@vimCmdList,@vimCommand_ 337 syn match vimAddress contained "\%#=1[.$]" skipwhite nextgroup=vimAddressOffset,vimAddressSeparator,vimCmdStart,@vimCmdList,vimCommand 338 syn match vimAddress contained "\%#=1'[[\]<>'`"^.(){}]" skipwhite nextgroup=vimAddressOffset,vimAddressSeparator,vimCmdStart,@vimCmdList,vimCommand 339 syn match vimAddress contained "\%#=1'[a-zA-Z0-9]" skipwhite nextgroup=vimAddressOffset,vimAddressSeparator,vimCmdStart,@vimCmdList,@vimCommand_ 340 " NOTE: needs leading ':' to distinguish \/ from line continuation in Vim script 341 syn match vimAddress contained "\%#=1\\[/?&]" skipwhite nextgroup=vimAddressOffset,vimAddressSeparator,vimCmdStart,@vimCmdList,vimCommand 342 343 syn match vimAddressSeparator contained "\%#=1[,;]" skipwhite nextgroup=vimAddress,vimAddressPattern,vimAddressOffset,vimCmdStart,@vimCmdList,vimCommand,vimAddressSeparator 344 345 syn cluster vimRange contains=vimRange,vimAddress,vimAddressPattern,vimAddressOffset,vimAddressSeparator 346 347 " :@ {{{3 348 " == 349 " syn match vimAtArg contained +[0-9a-z".=*+:@]+ skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 350 " syn match vimAt contained "@" nextgroup=vimAtArg,vimComment,vim9Comment,vimCmdSep 351 352 " NOTE: :* as an alias for :@ is not supported, this is considered a :range, 353 " see :help cpo-star 354 syn match vimAtArg contained +@\@1<=[0-9a-z".=*+:@]+ 355 syn match vimAt contained +@[0-9a-z".=*+:@]\ze\s*\%($\|[|"#]\)+ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment contains=vimAtArg 356 " Vim9: avoid LHS assignment mismatching of :@["#] 357 syn match vimAt contained +@\ze\s*\%($\||\|\s["#]\)+ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment 358 359 " :number, :# {{{3 360 " =========== 361 " TODO: needs to be limited to after a ':' in Vim9, otherwise a comment 362 if s:vim9script 363 syn match vimPound contained ":\@1<=#" skipwhite nextgroup=vimPoundCount,vimPrintFlag 364 else 365 syn match vimPound contained "#" skipwhite nextgroup=vimPoundCount,vimPrintFlag 366 endif 367 syn keyword vimPound contained nu[mber] skipwhite nextgroup=vimPoundCount,vimPrintFlag 368 syn match vimPound_ contained "nu\%[mber]\>" skipwhite nextgroup=vimPoundCount,vimPrintFlag 369 syn match vimPoundCount contained "\d\+" skipwhite nextgroup=vimPrintFlag 370 371 " := {{{3 372 " == 373 syn match vimEquals contained "=" skipwhite nextgroup=vimPrintFlag 374 375 " :>, :< {{{3 376 " ====== 377 378 syn match vimShiftLeft contained "<\%(line\)\@!" skipwhite nextgroup=vimShiftLeftPlus,vimShiftLeftCount,vimPrintFlag 379 syn match vimShiftLeftPlus contained "<" skipwhite nextgroup=vimShiftLeftPlus,vimShiftLeftCount,vimPrintFlag 380 syn match vimShiftLeftCount contained "\d\+" skipwhite nextgroup=vimPrintFlag 381 382 syn match vimShiftRight contained ">" skipwhite nextgroup=vimShiftRightPlus,vimShiftRightCount,vimPrintFlag 383 syn match vimShiftRightPlus contained ">" skipwhite nextgroup=vimShiftRightPlus,vimShiftRightCount,vimPrintFlag 384 syn match vimShiftRightCount contained "\d\+" skipwhite nextgroup=vimPrintFlag 385 386 " :abbreviate {{{3 387 " =========== 388 " GEN_SYN_VIM: vimCommand abbrev, START_STR='syn keyword vimAbb contained', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs' 389 " GEN_SYN_VIM: vimCommand abclear, START_STR='syn keyword vimAbb contained', END_STR='skipwhite nextgroup=vimMapMod' 390 391 " :append, :change, :insert {{{3 392 " ========================= 393 394 syn match vimCommand contained "\<a\%[ppend]\>" skipwhite skipnl skipempty nextgroup=vimTextInputBang,@vimTextInputText,vimTextInputComment,vimTextInputBar 395 syn match vimCommand_ contained "a\%[ppend]\>" skipwhite skipnl skipempty nextgroup=vimTextInputBang,@vimTextInputText,vimTextInputComment,vimTextInputBar 396 syn match vimCommand contained "\<c\%[hange]\>" skipwhite skipnl skipempty nextgroup=vimChangeBang,vimChangeCount,@vimTextInputText,vimTextInputComment,vimTextInputBar 397 syn match vimCommand_ contained "c\%[hange]\>" skipwhite skipnl skipempty nextgroup=vimChangeBang,vimChangeCount,@vimTextInputText,vimTextInputComment,vimTextInputBar 398 syn match vimCommand contained "\<i\%[nsert]\>" skipwhite skipnl skipempty nextgroup=vimTextInputBang,@vimTextInputText,vimTextInputComment,vimTextInputBar 399 syn match vimCommand_ contained "i\%[nsert]\>" skipwhite skipnl skipempty nextgroup=vimTextInputBang,@vimTextInputText,vimTextInputComment,vimTextInputBar 400 401 syn match vimChangeCount contained "\d\+" skipwhite skipnl skipempty nextgroup=@vimTextInputText,vimTextInputComment,vimTextInputBar 402 syn match vimChangeBang contained 403 \ "\a\@1<=!" 404 \ skipwhite skipnl skipempty nextgroup=vimChangeCount,@vimTextInputText,vimTextInputComment,vimTextInputBar 405 406 syn match vimTextInputBang contained "\a\@1<=!" skipwhite skipnl skipempty nextgroup=@vimTextInputText,vimTextInputComment,vimTextInputBar 407 syn match vimTextInputText contained "|\@1<=.*" skipnl skipempty nextgroup=@vimTextInputText 408 VimExtend syn region vimTextInputText contained 409 \ start="^." 410 \ matchgroup=vimCommand 411 \ end="^\.$" 412 " NOTE: 'autoindent' end marker not supported 413 syn match vimTextInputEnd contained "^\.$" 414 syn cluster vimTextInputText contains=vimTextInputText,vimTextInputEnd 415 416 syn match vimTextInputComment contained 417 \ /".*/ 418 \ skipnl skipempty nextgroup=@vimTextInputText 419 syn match vimTextInputBar contained 420 \ "\s*\zs|" 421 \ nextgroup=@vimTextInputText 422 423 if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'T' 424 " excludes "extend" option, handled by wrapper 425 syn region vimTextInputText contained 426 \ start="^." 427 \ matchgroup=vimCommand 428 \ end="^\.$" 429 VimExtend syn region vimTextInputFold contained 430 \ start="\<a\%[ppend]\>" 431 \ start="\<c\%[hange]\>" 432 \ start="\<i\%[nsert]\>" 433 \ end="^\.$" 434 \ contains=vimCommand 435 \ fold keepend transparent 436 syn region vimTextInputFold_ contained 437 \ start="a\%[ppend]\>" 438 \ start="c\%[hange]\>" 439 \ start="i\%[nsert]\>" 440 \ end="^\.$" 441 \ contains=vimCommand_ 442 \ fold keepend transparent 443 endif 444 445 " :argdo, :bufdo, :tabdo, :windo, :cdo, :cfdo, :ldo, :lfdo, :folddoopen, :folddoclosed {{{3 446 " ===================================================================================== 447 syn match vimDoCommandBang contained "\a\@1<=!" skipwhite nextgroup=@vimCmdList 448 449 syn keyword vimDoCommand contained argdo skipwhite nextgroup=vimDoCommandBang,@vimCmdList 450 syn match vimDoCommand_ contained "argdo\>" skipwhite nextgroup=vimDoCommandBang,@vimCmdList 451 syn keyword vimDoCommand contained bufdo skipwhite nextgroup=vimDoCommandBang,@vimCmdList 452 syn match vimDoCommand_ contained "bufdo\>" skipwhite nextgroup=vimDoCommandBang,@vimCmdList 453 syn keyword vimDoCommand contained tabd[o] skipwhite nextgroup=@vimCmdList 454 syn match vimDoCommand_ contained "tabdo\=\>" skipwhite nextgroup=@vimCmdList 455 syn keyword vimDoCommand contained windo skipwhite nextgroup=@vimCmdList 456 syn match vimDoCommand_ contained "windo\>" skipwhite nextgroup=@vimCmdList 457 458 syn keyword vimDoCommand contained cdo skipwhite nextgroup=vimDoCommandBang,@vimCmdList 459 syn match vimDoCommand_ contained "cdo\>" skipwhite nextgroup=vimDoCommandBang,@vimCmdList 460 syn keyword vimDoCommand contained cfd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList 461 syn match vimDoCommand_ contained "cfdo\=\>" skipwhite nextgroup=vimDoCommandBang,@vimCmdList 462 463 syn keyword vimDoCommand contained ldo skipwhite nextgroup=vimDoCommandBang,@vimCmdList 464 syn match vimDoCommand_ contained "ldo\>" skipwhite nextgroup=vimDoCommandBang,@vimCmdList 465 syn keyword vimDoCommand contained lfd[o] skipwhite nextgroup=vimDoCommandBang,@vimCmdList 466 syn match vimDoCommand_ contained "lfdo\=\>" skipwhite nextgroup=vimDoCommandBang,@vimCmdList 467 468 syn keyword vimDoCommand contained foldd[oopen] skipwhite nextgroup=@vimCmdList 469 syn match vimDoCommand_ contained "foldd\%[oopen]\>" skipwhite nextgroup=@vimCmdList 470 syn keyword vimDoCommand contained folddoc[losed] skipwhite nextgroup=@vimCmdList 471 syn match vimDoCommand_ contained "folddoc\%[losed]\>" skipwhite nextgroup=@vimCmdList 472 473 " :augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{3 474 " ======== : Trade-off: Increasing synclines with slower editing vs augroup END error checking. 475 syn cluster vimAugroupList contains=@vimFunc,vimLineStart,vimContinue,vimCmdSep,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,@vimComment,vimString,vimNotation,vimCtrlChar 476 477 " define 478 VimFolda syn region vimAugroup contained 479 \ start="\<aug\%[roup]\>\ze\s\+\%([eE][nN][dD]\%($\|[[:space:]|"#]\)\)\@!\S" 480 \ matchgroup=vimAugroupKey 481 \ end="\<aug\%[roup]\ze\s\+[eE][nN][dD]\s*\%($\|[|"#]\)" 482 \ skipwhite nextgroup=vimAugroupEnd 483 \ contains=vimAutocmd,@vimAugroupList,vimAugroupKey 484 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror") 485 syn match vimAugroupError "\<aug\%[roup]\s\+[eE][nN][dD]\ze\s*\%($\|[|"#]\)" 486 endif 487 488 " TODO: Vim9 comment 489 syn match vimAugroupName contained "\%(\\["|[:space:]]\|[^"|[:space:]]\)\+" 490 \ skipwhite nextgroup=vimCmdSep,vimComment 491 syn match vimAugroupEnd contained "\c\<END\>" skipwhite nextgroup=vimCmdSep,vimComment 492 syn match vimAugroupBang contained "\a\@1<=!" skipwhite nextgroup=vimAugroupName 493 syn keyword vimAugroupKey contained aug[roup] skipwhite nextgroup=vimAugroupBang,vimAugroupName,vimAugroupEnd 494 495 " remove 496 syn match vimAugroup contained "\<aug\%[roup]!" skipwhite nextgroup=vimAugroupName contains=vimAugroupKey,vimAugroupBang 497 498 " list 499 VimL syn match vimAugroup contained "\<aug\%[roup]\>\ze\s*\%(["|]\|$\)" skipwhite nextgroup=vimCmdSep,vimComment contains=vimAugroupKey 500 Vim9 syn match vimAugroup contained "\<aug\%[roup]\>\ze\s*\%([#|]\|$\)" skipwhite nextgroup=vimCmdSep,vim9Comment contains=vimAugroupKey 501 502 " :autocmd, :doautocmd, :doautoall {{{3 503 " ================================ 504 505 " TODO: explicitly match the {cmd} arg rather than bailing out to TOP 506 syn region vimAutocmdBlock contained 507 \ matchgroup=vimSep 508 \ start="{\ze\s*\%($\|[#|]\)" 509 \ end="^\s*\zs}" 510 \ end="\%(\\\@<!|\s*\)\=\zs}" 511 \ contains=@vimDefBodyList 512 513 syn match vimAutocmdGroup contained "\%(\\["|[:space:]]\|[^"|[:space:]]\)\+" skipwhite nextgroup=vimAutoEvent,vimAutoEventGlob 514 syn match vimAutocmdBang contained "\a\@1<=!" skipwhite nextgroup=vimAutocmdGroup,vimAutoEvent,vimAutoEventGlob 515 516 " TODO: cleaner handling of | in pattern position 517 " : match pattern items in addition to wildcards 518 syn region vimAutocmdPattern contained 519 \ start="|\@!\S" 520 \ skip="\\\\\|\\[,[:space:]]" 521 \ end="\ze[,[:space:]]" 522 \ end="$" 523 \ skipwhite skipnl nextgroup=vimAutocmdPatternSep,vimAutocmdMod,vimAutocmdBlock,@vimAutocmdContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func,@vimFunc 524 \ contains=vimEnvvar,@vimWildcard,vimAutocmdPatternEscape 525 syn match vimAutocmdBufferPattern contained "<buffer\%(=\%(\d\+\|abuf\)\)\=>" skipwhite skipnl nextgroup=vimAutocmdPatternSep,vimAutocmdMod,vimAutocmdBlock,@vimAutocmdContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func,@vimFunc 526 syn match vimAutocmdPatternSep contained "," skipwhite skipnl nextgroup=@vimAutocmdPattern,@vimAutocmdContinue 527 " trailing pattern separator comma allowed 528 syn match vimAutocmdPatternSep contained ",\ze\s\+" skipwhite skipnl nextgroup=vimAutocmdMod,vimAutocmdBlock,@vimAutocmdContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func,@vimFunc 529 syn match vimAutocmdPatternEscape contained "\\." 530 syn cluster vimAutocmdPattern contains=vimAutocmdPattern,vimAutocmdBufferPattern 531 532 " TODO: Vim9 requires '++' prefix 533 syn match vimAutocmdMod contained "\%(++\)\=\<nested\>" skipwhite skipnl nextgroup=vimAutocmdMod,vimAutocmdBlock,@vimAutocmdContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func,@vimFunc 534 syn match vimAutocmdMod contained "++once\>" skipwhite skipnl nextgroup=vimAutocmdMod,vimAutocmdBlock,@vimAutocmdContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func,@vimFunc 535 536 " higher priority than vimAutocmdGroup, assume no group is so named 537 syn match vimAutoEventGlob contained "*" skipwhite nextgroup=@vimAutocmdPattern 538 syn match vimAutoEventSep contained "\a\@1<=," nextgroup=vimAutoEvent 539 syn match vimUserAutoEventSep contained "\a\@1<=," nextgroup=vimUserAutoEvent 540 541 syn keyword vimAutocmd contained au[tocmd] skipwhite nextgroup=vimAutocmdBang,vimAutocmdGroup,vimAutoEvent,vimAutoEventGlob 542 543 syn match vimAutocmdContinue contained "^\s*\\" skipwhite skipnl nextgroup=@vimAutocmdContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func,@vimFunc contains=vimLeadingWhitespace 544 syn match vimAutocmdContinueComment contained '^\s*["#]\\ .*' skipwhite skipnl nextgroup=@vimAutocmdContinue contains=vimLeadingWhitespace 545 syn cluster vimAutocmdContinue contains=vimAutocmdContinue,vimAutocmdContinueComment 546 547 syn match vimDoautocmdMod contained "<nomodeline>" skipwhite nextgroup=vimAutocmdGroup,vimAutoEvent 548 syn keyword vimDoautocmd contained do[autocmd] skipwhite nextgroup=vimDoautocmdMod,vimAutocmdGroup,vimAutoEvent 549 syn keyword vimDoautocmd contained doautoa[ll] skipwhite nextgroup=vimDoautocmdMod,vimAutocmdGroup,vimAutoEvent 550 551 " :behave {{{3 552 " ======= 553 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror") 554 syn match vimBehaveError contained "[^ ]\+" 555 endif 556 syn keyword vimBehave contained be[have] nextgroup=vimBehaveBang,vimBehaveModel,vimBehaveError skipwhite 557 syn match vimBehaveBang contained "\a\@1<=!" nextgroup=vimBehaveModel skipwhite 558 syn keyword vimBehaveModel contained mswin xterm 559 560 " :breakadd, :breakdel, :breaklist {{{3 561 " ================================ 562 syn keyword vimBreakaddFunc contained func skipwhite nextgroup=vimBreakpointFunctionLine,vimBreakpointFunction 563 syn keyword vimBreakaddFile contained file skipwhite nextgroup=vimBreakpointFileLine,vimBreakpointFilename 564 syn keyword vimBreakaddHere contained here skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 565 syn keyword vimBreakaddExpr contained expr skipwhite nextgroup=@vimExprList 566 567 syn match vimBreakpointGlob contained "*" skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 568 syn match vimBreakpointNumber contained "\<\d\+\>" skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 569 570 syn cluster vimBreakpointArg contains=vimBreakaddFunc,vimBreakaddFile,vimBreakaddHere,vimBreakaddExpr 571 572 syn match vimBreakpointFunction contained "\<\%(\*\|\w\)\+\>" skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 573 syn match vimBreakpointFilename contained "\<\%(\*\|\f\)\+\>" skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 574 syn match vimBreakpointFunctionLine contained "\<\d\+\>" skipwhite nextgroup=vimBreakpointFunction 575 syn match vimBreakpointFileLine contained "\<\d\+\>" skipwhite nextgroup=vimBreakpointFilename 576 577 syn keyword vimBreakadd contained breaka[dd] skipwhite nextgroup=@vimBreakpointArg 578 syn keyword vimBreakdel contained breakd[el] skipwhite nextgroup=@vimBreakpointArg,vimBreakpointNumber,vimBreakpointGlob 579 syn keyword vimBreaklist contained breakl[ist] skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 580 581 " :buffer {{{3 582 " ======= 583 " lower priority than [wtb]: Vim9 scoped variables at SOL 584 syn match vimBuffer contained "\<b\%[uffer]\>" nextgroup=vimBang 585 syn match vimBuffer_ contained "b\%[uffer]\>" nextgroup=vimBang 586 587 " :call {{{3 588 " ===== 589 syn keyword vimCall contained cal[l] skipwhite nextgroup=vimVar,@vimFunc 590 syn match vimCall_ contained "call\=\>" skipwhite nextgroup=vimVar,@vimFunc 591 592 " :cd {{{3 593 " === 594 " GEN_SYN_VIM: vimCommand cd, START_STR='syn keyword vimCd contained', END_STR='skipwhite nextgroup=vimCdBang,vimCdArg,vimComment,vim9Comment,vimCmdSep' 595 syn match vimCd contained "\<chd\%[ir]\>" skipwhite nextgroup=vimCdBang,vimCdArg,vimComment,vim9Comment,vimCmdSep 596 syn region vimCdArg contained 597 \ start=+["#|]\@!\S+ 598 \ end="\ze\s*$" 599 \ end=+\ze\s*\\\@1<!["#|]+ 600 \ skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 601 \ contains=vimSpecFile,@vimWildcard 602 \ oneline 603 604 syn match vimCdBang contained "\a\@1<=!" skipwhite nextgroup=vimCdArg,vimComment,vim9Comment,vimCmdSep 605 606 " :command {{{3 607 " ======== 608 syn cluster vimUserCmdList contains=@vimCmdList,vimComment,vimCtrlChar,vimEscapeBrace,@vimFunc,vimNotation,vimNumber,vimOper,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,@vim9Lhs,vimCmdSep 609 610 syn match vimUserCmd contained "\<com\%[mand]\>!\=" skipwhite nextgroup=vimUserCmdAttrs,vimUserCmdName contains=vimBang 611 syn match vimUserCmd contained +\<com\%[mand]\>!\=\ze\s*\n\s*\%(\\\|["#]\\ \)+ skipwhite skipnl nextgroup=vimUserCmdAttrs,vimUserCmdName contains=vimBang 612 613 syn region vimUserCmdAttrs contained 614 \ start="-\l" 615 \ start=+^\s*\%(\\\|["#]\\ \)+ 616 \ end="\ze\s\u" 617 \ skipwhite nextgroup=vimUserCmdName 618 \ contains=@vimContinue,vimUserCmdAttr,vimUserCmdAttrError 619 \ transparent 620 syn match vimUserCmdAttrError contained "-\a\+\ze\%(\s\|=\)" 621 syn match vimUserCmdAttr contained "-addr=" contains=vimUserCmdAttrKey nextgroup=vimUserCmdAttrAddr 622 syn match vimUserCmdAttr contained "-bang\>" contains=vimUserCmdAttrKey 623 syn match vimUserCmdAttr contained "-bar\>" contains=vimUserCmdAttrKey 624 syn match vimUserCmdAttr contained "-buffer\>" contains=vimUserCmdAttrKey 625 syn match vimUserCmdAttr contained "-complete=" contains=vimUserCmdAttrKey nextgroup=vimUserCmdAttrComplete,vimUserCmdError 626 syn match vimUserCmdAttr contained "-count\>" contains=vimUserCmdAttrKey 627 syn match vimUserCmdAttr contained "-count=" contains=vimUserCmdAttrKey nextgroup=vimNumber 628 syn match vimUserCmdAttr contained "-keepscript\>" contains=vimUserCmdAttrKey 629 syn match vimUserCmdAttr contained "-nargs=" contains=vimUserCmdAttrKey nextgroup=vimUserCmdAttrNargs 630 syn match vimUserCmdAttr contained "-range\>" contains=vimUserCmdAttrKey 631 syn match vimUserCmdAttr contained "-range=" contains=vimUserCmdAttrKey nextgroup=vimNumber,vimUserCmdAttrRange 632 syn match vimUserCmdAttr contained "-register\>" contains=vimUserCmdAttrKey 633 634 syn match vimUserCmdAttrNargs contained "[01*?+]" 635 syn match vimUserCmdAttrRange contained "%" 636 637 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror") 638 syn match vimUserCmdError contained "\S\+\>" 639 endif 640 641 syn case ignore 642 syn keyword vimUserCmdAttrKey contained a[ddr] ban[g] bar bu[ffer] com[plete] cou[nt] k[eepscript] n[args] ra[nge] re[gister] 643 644 " GEN_SYN_VIM: vimUserCmdAttrComplete, START_STR='syn keyword vimUserCmdAttrComplete contained', END_STR='' 645 syn keyword vimUserCmdAttrComplete contained arglist augroup behave breakpoint buffer color command compiler cscope diff_buffer dir dir_in_path environment event expression file file_in_path filetype function help highlight history keymap locale mapclear mapping menu messages option packadd runtime scriptnames shellcmd shellcmdline sign syntax syntime tag tag_listfiles user var 646 syn keyword vimUserCmdAttrComplete contained custom customlist nextgroup=vimUserCmdAttrCompleteFunc,vimUserCmdError 647 syn match vimUserCmdAttrCompleteFunc contained ",\%([bwglstav]:\|<[sS][iI][dD]>\)\=\h\w*\%([.#]\h\w*\)*"hs=s+1 nextgroup=vimUserCmdError contains=vimVarScope,vimFunctionSID 648 649 " GEN_SYN_VIM: vimUserCmdAttrAddr, START_STR='syn keyword vimUserCmdAttrAddr contained', END_STR='' 650 syn keyword vimUserCmdAttrAddr contained arguments arg buffers buf lines line loaded_buffers load other quickfix qf tabs tab windows win 651 syn match vimUserCmdAttrAddr contained "?" 652 syn case match 653 654 syn match vimUserCmdName contained "\<\u[[:alnum:]]*\>" skipwhite nextgroup=vimUserCmdBlock,vimUserCmdReplacement 655 syn match vimUserCmdName contained +\<\u[[:alnum:]]*\>\ze\s*\n\s*\%(\\\|["#]\\ \)+ skipwhite skipnl nextgroup=vimUserCmdBlock,vimUserCmdReplacement 656 syn region vimUserCmdReplacement contained 657 \ start="\S" 658 \ start=+^\s*\%(\\\|["#]\\ \)+ 659 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 660 \ end="$" 661 \ contains=@vimContinue,@vimUserCmdList,vimComFilter 662 \ keepend 663 syn region vimUserCmdBlock contained 664 \ matchgroup=vimSep 665 \ start="{\ze\s*\%($\|[#|]\)" 666 \ end="^\s*\zs}" 667 \ end="\%(\\\@<!|\s*\)\=\zs}" 668 \ contains=@vimDefBodyList,@vimUserCmdList 669 670 syn keyword vimDelcommand contained delc[ommand] skipwhite nextgroup=vimDelcommandAttr,vimDelcommandName 671 syn match vimDelcommandAttr contained "-buffer\>" skipwhite nextgroup=vimDelcommandName 672 syn match vimDelcommandName contained "\<\u[[:alnum:]]*\>" 673 674 " :copy (special handling for :t only) {{{3 675 " ===== 676 " lower priority than [wtb]: Vim9 scoped variables at SOL 677 syn match vimCopy contained "\<t\>" nextgroup=vimBang 678 syn match vimCopy_ contained "t\>" nextgroup=vimBang 679 680 " :debug {{{3 681 " ====== 682 syn keyword vimDebug contained deb[ug] skipwhite nextgroup=@vimCmdList 683 684 " :debuggreedy {{{3 685 " ============ 686 syn keyword vimDebuggreedy contained debugg[reedy] 687 syn match vimDebuggreedy_ contained "debugg\%[reedy]\>" 688 689 " :defer {{{3 690 " ====== 691 syn keyword vimDefer contained defe[r] skipwhite nextgroup=@vimFunc,vim9LambdaParams 692 693 " :delete {{{3 694 " ======= 695 " TODO: handle Vim9 696 syn keyword vimDelete contained d[elete] skipwhite nextgroup=vimDeleteRegister,vimDeleteCount,vimPrintFlag 697 syn match vimDelete_ contained "d\%[elete]\>" skipwhite nextgroup=vimDeleteRegister,vimDeleteCount,vimPrintFlag 698 699 syn match vimDelete contained "\<d\%[elete]\ze\%([lp]\+\>\|#\)" nextgroup=vimPrintFlag 700 syn match vimDelete_ contained "d\%[elete]\ze\%([lp]\+\>\|#\)" nextgroup=vimPrintFlag 701 " :del is :delete only, not :delete | :list 702 syn match vimDelete contained "\<del\>" 703 syn match vimDelete_ contained "del\>" 704 705 syn match vimDelete contained "\<d\%[elete]\ze\%(_\|\d\+\>\)" nextgroup=vimDeleteRegister,vimDeleteCount 706 syn match vimDelete_ contained "d\%[elete]\ze\%(_\|\d\+\>\)" nextgroup=vimDeleteRegister,vimDeleteCount 707 708 syn match vimDeleteRegister contained +[-*+_]\|\\"+ skipwhite nextgroup=vimDeleteCount,vimPrintFlag 709 syn match vimDeleteRegister contained +\<\a+ skipwhite nextgroup=vimDeleteCount,vimPrintFlag 710 711 syn match vimDeleteCount contained "\d\+" skipwhite nextgroup=vimPrintFlag 712 713 " :echo, :execute {{{3 714 " =============== 715 " NOTE: No trailing legacy script comments 716 717 syn region vimEcho contained 718 \ matchgroup=vimCommand 719 \ start="\<ec\%[ho]\>" 720 \ start="\<echoe\%[rr]\>" 721 \ start="\<echom\%[sg]\>" 722 \ start="\<echoc\%[onsole]\>" 723 \ start="\<echon\>" 724 "\ TODO: default to \<echowindow\> 725 \ start="\<echow\%[indow]\>" 726 \ skip=+\\|\|||\|\n\s*\%(\\\|["#]\\ \)+ 727 \ end="\ze|" 728 \ excludenl end="$" 729 \ nextgroup=vimCmdSep 730 \ contains=@vimContinue,@vimExprList,vim9Comment 731 \ transparent 732 733 syn match vimEchohl contained "\<echohl\=\>" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchohlNone 734 syn case ignore 735 syn keyword vimEchohlNone contained none 736 syn case match 737 738 syn cluster vimEcho contains=vimEcho,vimEchohl 739 740 syn region vimExecute contained 741 \ matchgroup=vimCommand 742 \ start="\<exe\%[cute]\>" 743 \ skip=+\\|\|||\|\n\s*\%(\\\|["#]\\ \)+ 744 \ end="\ze|" 745 \ excludenl end="$" 746 \ nextgroup=vimCmdSep 747 \ contains=@vimContinue,@vimExprList,vim9Comment 748 \ transparent 749 750 syn region vimEval contained 751 \ matchgroup=vimCommand 752 \ start="\<ev\%[al]\>" 753 \ skip=+\\|\|||\|\n\s*\%(\\\|["#]\\ \)+ 754 \ end="\ze|" 755 \ excludenl end="$" 756 \ nextgroup=vimCmdSep 757 \ contains=@vimContinue,@vimExprList,vim9Comment,vimComment 758 \ transparent 759 760 " :filter {{{3 761 " ======= 762 syn keyword vimExFilter contained filt[er] skipwhite nextgroup=vimExFilterBang,vimExFilterPattern 763 syn region vimExFilterPattern contained 764 \ start="[[:ident:]]" 765 \ end="\ze[[:space:]\n]" 766 \ skipwhite skipnl nextgroup=@vimCommandModifierContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func 767 \ contains=@vimSubstList 768 \ oneline 769 syn region vimExFilterPattern contained 770 \ matchgroup=Delimiter 771 \ start="\z([^[:space:][:ident:]|"]\)" 772 \ skip="\\\\\|\\\z1" 773 \ end="\z1" 774 \ skipwhite skipnl nextgroup=@vimCommandModifierContinue,vimCmdStart,@vimRange,@vimCmdList,@vim9Lhs,@vim9Func 775 \ contains=@vimSubstList 776 \ oneline 777 syn match vimExFilterBang contained "\a\@1<=!" skipwhite nextgroup=vimExFilterPattern 778 779 " :catch, :throw {{{3 780 " ============== 781 syn keyword vimThrow contained th[row] skipwhite nextgroup=@vimExprList 782 syn keyword vimCatch contained cat[ch] skipwhite nextgroup=vimCatchPattern 783 syn region vimCatchPattern contained matchgroup=Delimiter start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSubstList oneline 784 785 " :export {{{3 786 " ======= 787 if s:vim9script 788 syn keyword vim9Export export contained 789 \ skipwhite nextgroup=vim9Abstract,vim9ClassBody,vim9Const,vimDef,vimDefFold,vim9EnumBody,vim9Final,vim9InterfaceBody,vim9Type,vim9Var 790 endif 791 792 " :filetype {{{3 793 " ========= 794 syn match vimFiletype contained "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError 795 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimFTError") 796 syn match vimFTError contained "\I\i*" 797 endif 798 syn keyword vimFTCmd contained filet[ype] 799 syn keyword vimFTOption contained detect indent off on plugin 800 801 " :for {{{3 802 " ==== 803 " handles Vim9 and legacy for now 804 syn region vimFor contained 805 \ matchgroup=vimCommand 806 \ start="\<for\>" end="\<in\>" 807 \ skipwhite skipnl nextgroup=@vimForInContinue,vim9ForInComment,@vimExprList 808 \ contains=@vimContinue,vimVar,vimVarList,vim9Variable,vim9VariableList 809 \ transparent 810 811 syn match vim9ForInComment contained "#.*" skipwhite skipempty nextgroup=vim9ForInComment,@vimExprList 812 813 syn match vimForInContinue contained "^\s*\zs\\" skipwhite skipnl nextgroup=@vimForInContinue,@vimExprList contains=vimLeadingWhitespace 814 syn match vimForInContinueComment contained '^\s*\zs["#]\\ .*' skipwhite skipnl nextgroup=@vimForInContinue,@vimExprList contains=vimLeadingWhitespace 815 syn cluster vimForInContinue contains=vimForInContinue,vimForInContinueComment 816 817 " :global, :vglobal {{{3 818 " ================= 819 " TODO: [:.-] should only be removed for Vim9 820 " : docs state ! is not allowed as a pattern delimiter but it works 821 syn region vimGlobalPattern contained 822 \ matchgroup=Delimiter 823 \ start=+\z([^[:space:][:alnum:]\\"|:.-]\)+ 824 \ skip="\\." 825 \ end="\z1" 826 \ excludenl 827 \ end="$" 828 \ skipwhite nextgroup=vimCmdStart,@vimRange,@vimCmdList 829 \ contains=@vimSubstList 830 syn match vimGlobal contained "g\%[lobal]\>!\=[:.-]\@!" skipwhite nextgroup=vimGlobalPattern contains=vimBang 831 syn match vimGlobal contained "v\%[global]\>!\=[:.-]\@!" skipwhite nextgroup=vimGlobalPattern contains=vimBang 832 833 " :grep, :make {{{3 834 " ============ 835 " | is the command separator, escaped with \| all other backslashes are passed through literally, no tail comments 836 syn keyword vimGrep contained gr[ep] lgr[ep] skipwhite nextgroup=vimGrepBang,vimGrepArgs,vimCmdSep 837 syn match vimGrep_ contained "l\=gr\%[ep]\>" skipwhite nextgroup=vimGrepBang,vimGrepArgs,vimCmdSep 838 syn keyword vimGrepadd contained grepa[dd] lgrepa[dd] skipwhite nextgroup=vimGrepBang,vimGrepArgs,vimCmdSep 839 syn match vimGrepadd_ contained "l\=grepa\%[dd]\>" skipwhite nextgroup=vimGrepBang,vimGrepArgs,vimCmdSep 840 syn region vimGrepArgs contained 841 \ start="|\@!\S" 842 \ skip=+\n\s*\%(\\\|[#"]\\ \)+ 843 \ end="\ze|" 844 \ end="$" 845 "\ TODO: include vimSpecFile 846 \ nextgroup=vimCmdSep 847 \ contains=vimGrepBarEscape 848 syn match vimGrepBarEscape contained "\\|" 849 syn match vimGrepBang contained "\a\@1<=!" skipwhite nextgroup=vimGrepArgs,vimCmdSep 850 851 syn keyword vimMake contained mak[e] lmak[e] skipwhite nextgroup=vimMakeBang,vimMakeArgs,vimCmdSep 852 syn region vimMakeArgs contained 853 \ start="|\@!\S" 854 \ skip=+\n\s*\%(\\\|[#"]\\ \)+ 855 \ end="\ze|" 856 \ end="$" 857 \ nextgroup=vimCmdSep 858 "\ TODO: include vimSpecFile 859 \ contains=vimMakeBarEscape 860 syn match vimMakeBarEscape contained "\\|" 861 syn match vimMakeBang contained "\a\@1<=!" skipwhite nextgroup=vimMakeArgs,vimCmdSep 862 863 " :help, :helpgrep, :lhelpgrep {{{3 864 " ============================ 865 syn keyword vimHelp contained h[elp] skipwhite nextgroup=vimHelpBang,vimHelpArg,vimHelpEndCommand 866 " TODO: match wildcards, ignoring exceptions? 867 syn region vimHelpArg contained 868 \ start="\S" 869 \ matchgroup=Special 870 \ end="\%(@\a\a\)\=\ze\s*\%($\|\%x0d\|\%x00\||[^|]\)" 871 \ skipwhite nextgroup=vimHelpEndCommand 872 \ oneline 873 syn match vimHelpBang contained "\a\@1<=!" skipwhite nextgroup=vimHelpArg,vimHelpEndCommand 874 syn match vimHelpEndCommand contained "\ze|[^|]" skipwhite nextgroup=vimCmdSep 875 syn match vimHelpEndCommand contained "\%x0d\|\%x00" skipwhite nextgroup=vimCmdStart,@vimRange,@vimCmdList,vimFunc,vim9Block,@vim9Lhs 876 877 syn keyword vimHelpgrep contained helpg[rep] lh[elpgrep] skipwhite nextgroup=vimHelpgrepPattern 878 syn region vimHelpgrepPattern contained 879 \ start="\S" 880 \ matchgroup=Special 881 \ end="@\a\a\>" 882 \ end="$" 883 \ contains=@vimSubstList 884 \ oneline 885 886 " :highlight {{{3 887 " ========== 888 syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,@vimComment 889 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") 890 syn match vimHiCtermError contained "\D\i*" 891 endif 892 syn keyword vimHighlight contained hi[ghlight] skipwhite nextgroup=vimHiBang,@vimHighlightCluster 893 syn match vimHiBang contained "\a\@1<=!" skipwhite nextgroup=@vimHighlightCluster 894 895 syn case ignore 896 " Conceal is a generated low-priority match 897 syn match vimHiGroup contained "\%(\<Conceal\>\)\@!\i\+" 898 syn keyword vimHiNone contained NONE 899 syn keyword vimHiAttrib contained none bold inverse italic nocombine reverse standout strikethrough underline undercurl underdashed underdotted underdouble 900 syn keyword vimFgBgAttrib contained none bg background fg foreground 901 syn case match 902 syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib 903 syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList 904 syn case ignore 905 syn keyword vimHiCtermColor contained black blue brown cyan darkblue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey grey40 grey50 grey90 lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred lightyellow magenta red seagreen white yellow 906 syn match vimHiCtermColor contained "\<color\d\{1,3}\>" 907 syn case match 908 909 syn match vimHiFontname contained "[a-zA-Z\-*]\+" 910 syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'" 911 syn match vimHiGuiRgb contained "#\x\{6}" 912 913 " :highlight {group} {key}={arg} ... {{{3 914 syn cluster vimHiCluster contains=vimGroup,vimHLGroup,vimHiGroup,vimHiNone,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiCtermul,vimHiCtermfont,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation,vimComment,vim9Comment 915 syn region vimHiKeyList contained 916 \ start="\i\+" 917 \ skip=+\\\\\|\\|\|\n\s*\%(\\\|["#]\\ \)+ 918 \ end="\ze|" 919 \ excludenl 920 \ end="$" 921 \ nextgroup=vimCmdSep 922 \ contains=@vimContinue,@vimHiCluster 923 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror") 924 syn match vimHiKeyError contained "\i\+="he=e-1 925 endif 926 syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList 927 syn match vimHiStartStop contained "\c\%(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption 928 syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList 929 syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError 930 syn match vimHiCtermul contained "\cctermul="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError 931 syn match vimHiCtermfont contained "\cctermfont="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError 932 syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList 933 syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname 934 syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib 935 syn match vimHiTermcap contained "\S\+" contains=vimNotation 936 syn match vimHiNmbr contained '\d\+' 937 938 " :highlight clear {{{3 939 syn keyword vimHiClear contained clear skipwhite nextgroup=vimGroup,vimHLGroup,vimHiGroup 940 941 " :highlight link {{{3 942 " see tst24 (hi def vs hi) (Jul 06, 2018) 943 "syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation 944 " TODO: simplify and allow line continuations --djk 945 syn region vimHiLink contained 946 \ matchgroup=Type 947 \ start="\%(\<hi\%[ghlight]!\=\s\+\)\@<=\%(\%(def\%[ault]\s\+\)\=link\>\|\<def\%[ault]\>\)" 948 \ skip=+\\\\\|\\|\|\n\s*\%(\\\|"\\ \)+ 949 \ end="\ze|" 950 \ excludenl 951 \ end="$" 952 \ nextgroup=vimCmdSep 953 \ contains=@vimContinue,@vimHiCluster 954 955 " :history {{{3 956 " ======== 957 " TODO: handle Vim9 "history" variable assignment (like `:wincmd =`, but a common variable name) 958 syn keyword vimHistory contained his[tory] skipwhite nextgroup=vimHistoryName,vimHistoryRange,vimCmdSep,vimComment,vim9Comment 959 syn keyword vimHistoryName contained c[md] s[earch] e[xpr] i[nput] d[ebug] a[ll] skipwhite nextgroup=vimHistoryRange,vimCmdSep,vimComment,vim9Comment 960 syn match vimHistoryName contained "[:/?=@>]" skipwhite nextgroup=vimHistoryRange,vimCmdSep,vimComment,vim9Comment 961 syn match vimHistoryRange contained "-\=\<\d\+\>\%(\s*,\)\=" skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment 962 syn match vimHistoryRange contained ",\s*-\=\d\+\>" skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment 963 syn match vimHistoryRange contained "-\=\<\d\+\s*,\s*-\=\d\+\>" skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment 964 965 " :if, :else, :elseif, :endif {{{3 966 " =========================== 967 syn keyword vimIf contained if skipwhite nextgroup=@vimExprList,vimNotation 968 syn keyword vimElseif contained elsei[f] skipwhite nextgroup=@vimExprList,vimNotation 969 syn keyword vimElse contained el[se] skipwhite nextgroup=vimComment,vim9Comment 970 syn keyword vimEndif contained en[dif] skipwhite nextgroup=vimComment,vim9Comment 971 972 " :import {{{3 973 " ======= 974 syn keyword vimImportAutoload contained autoload skipwhite nextgroup=vimImportFilename 975 if s:vim9script 976 syn region vimImportFilename contained 977 \ start="\S" 978 \ skip=+\%#=1 979 "\ continuation operators at SOL 980 \\n\%(\s*#.*\n\)*\s*\%([[:punct:]]\+\&[^#"'(]\) 981 \\| 982 "\ continuation operators at EOL 983 \\%(\%([[:punct:]]\+\&[^#"')]\)\s*\%(#.*\)\=\)\@<=$ 984 \\| 985 \\n\%(\s*#.*\n\)*\s*as\s 986 \\| 987 \\%(^\s*#.*\)\@<=$ 988 \\| 989 \\n\s*\%(\\\|#\\ \) 990 \+ 991 \ matchgroup=vimCommand 992 \ end="\s\+\zsas\ze\s\+\h" 993 \ matchgroup=NONE 994 \ end="$" 995 \ skipwhite nextgroup=vimImportName 996 \ contains=@vim9Continue,@vimExprList,vim9Comment 997 \ transparent 998 else 999 syn region vimImportFilename contained 1000 \ start="\S" 1001 \ skip=+\n\s*\%(\\\|"\\ \)+ 1002 \ matchgroup=vimCommand 1003 \ end="\s\+\zsas\ze\s\+\h" 1004 \ matchgroup=NONE 1005 \ end="$" 1006 \ skipwhite nextgroup=vimImportName 1007 \ contains=@vimContinue,@vimExprList 1008 \ transparent 1009 endif 1010 syn match vimImportName contained "\%(\<as\s\+\)\@<=\h\w*\>" skipwhite nextgroup=@vimComment 1011 syn keyword vimImport contained imp[ort] skipwhite nextgroup=vimImportAutoload,vimImportFilename 1012 1013 " :language {{{3 1014 " ========= 1015 syn keyword vimLanguage contained lan[guage] skipwhite nextgroup=@vimLanguageName,vimLanguageCategory,vimCmdSep,vimComment,vim9Comment 1016 syn keyword vimLanguageCategory contained col[late] cty[pe] mes[sages] tim[e] skipwhite nextgroup=@vimLanguageName 1017 1018 " [language[_territory][.codeset][@modifier]] and the reserved "C" and "POSIX" 1019 syn match vimLanguageName contained "[[:alnum:]][[:alnum:]._@-]*[[:alnum:]]" nextgroup=vimCmdSep,vimComment,vim9Comment 1020 syn keyword vimLanguageNameReserved contained C POSIX nextgroup=vimCmdSep,vimComment,vim9Comment 1021 syn cluster vimLanguageName contains=vimLanguageName,vimLanguageNameReserved 1022 1023 " :loadkeymap {{{3 1024 " =========== 1025 1026 syn match vimKeymapStart contained "^" skipwhite nextgroup=vimKeymapLhs,@vimKeymapLineComment 1027 syn match vimKeymapLhs contained "\S\+" skipwhite nextgroup=vimKeymapRhs contains=vimNotation 1028 syn match vimKeymapRhs contained "\S\+" skipwhite nextgroup=vimKeymapTailComment contains=vimNotation 1029 syn match vimKeymapTailComment contained "\S.*" 1030 1031 if s:vim9script 1032 syn match vim9KeymapLineComment "#.*" contained contains=@vimCommentGroup,vimCommentString,vim9CommentTitle 1033 else 1034 syn match vimKeymapLineComment +".*+ contained contains=@vimCommentGroup,vimCommentString,vimCommentTitle 1035 endif 1036 syn cluster vimKeymapLineComment contains=vim9\=KeymapLineComment 1037 1038 syn keyword vimLoadkeymap contained loadk[eymap] skipwhite skipnl nextgroup=vimKeymapMappings 1039 syn region vimKeymapMappings contained 1040 \ start="^" 1041 \ end="\%$" 1042 \ contains=vimKeymapStart 1043 \ transparent 1044 1045 " :lockvar, :unlockvar {{{3 1046 " ==================== 1047 syn keyword vimLockvar contained lockv[ar] skipwhite nextgroup=vimLockvarBang,vimLockvarDepth,vimLockvarVars 1048 syn keyword vimUnlockvar contained unlo[ckvar] skipwhite nextgroup=vimLockvarBang,vimLockvarDepth,vimLockvarVars 1049 syn match vimLockvarBang contained "\a\@1<=!" skipwhite nextgroup=vimLockvarVars 1050 syn match vimLockvarDepth contained "\<[0-3]\>" skipwhite nextgroup=vimLockvarVars 1051 syn region vimLockvarVars contained 1052 \ start="\h" skip=+\n\s*\%(\\\|"\\ \)\|^\s*"\\ + end="$" end="\ze[|"]" 1053 \ nextgroup=vimCmdSep,vimComment 1054 \ contains=@vimContinue,vimVar 1055 1056 " :map {{{3 1057 " ==== 1058 " GEN_SYN_VIM: vimCommand map, START_STR='syn keyword vimMap contained', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs' 1059 syn match vimMap contained "\<map\>" skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs 1060 syn keyword vimMap contained no[remap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs 1061 " GEN_SYN_VIM: vimCommand mapclear, START_STR='syn keyword vimMap contained', END_STR='skipwhite nextgroup=vimMapMod' 1062 syn keyword vimMap contained mapc[lear] skipwhite nextgroup=vimMapBang,vimMapMod 1063 " GEN_SYN_VIM: vimCommand unmap, START_STR='syn keyword vimUnmap contained', END_STR='skipwhite nextgroup=vimMapMod,vimMapLhs' 1064 syn keyword vimUnmap contained unm[ap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs 1065 1066 syn match vimMapLhs contained "\%(.\|\S\)\+" contains=vimCtrlChar,vimNotation,vimMapLeader skipwhite nextgroup=vimMapRhs 1067 syn match vimMapLhs contained +\%(.\|\S\)\+\ze\s*\n\s*\%(\\\|["#]\\ \)+ contains=vimCtrlChar,vimNotation,vimMapLeader skipwhite skipnl nextgroup=vimMapRhsContinue 1068 1069 syn match vimMapBang contained "\a\@1<=!" skipwhite nextgroup=vimMapMod,vimMapLhs 1070 syn match vimMapMod contained 1071 \ "\%#=1<\%(buffer\|expr\|nowait\|script\|silent\|special\|unique\)>" skipwhite nextgroup=vimMapMod,vimMapLhs contains=vimMapModKey,vimMapModErr 1072 syn region vimMapRhs contained 1073 \ start="\S" 1074 \ skip=+\\|\|\@1<=|\|\n\s*\%(\\\|["#]\\ \)+ 1075 \ end="\ze|" 1076 \ end="$" 1077 \ nextgroup=vimCmdSep 1078 \ contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader 1079 syn region vimMapRhsContinue contained 1080 \ start=+^\s*\%(\\\|["#]\\ \)+ 1081 \ skip=+\\|\|\@1<=|\|\n\s*\%(\\\|["#]\\ \)+ 1082 \ end="\ze|" 1083 \ end="$" 1084 \ nextgroup=vimCmdSep 1085 \ contains=@vimContinue,vimCtrlChar,vimNotation,vimMapLeader 1086 syn match vimMapLeader contained "\%#=1\c<\%(local\)\=leader>" contains=vimMapLeaderKey 1087 syn keyword vimMapModKey contained buffer expr nowait script silent special unique 1088 syn case ignore 1089 syn keyword vimMapLeaderKey contained leader localleader 1090 syn case match 1091 1092 " :mark {{{3 1093 " ===== 1094 VimL syn match vimMark contained "\<k\%([a-zA-Z0-9]\>\|[[\]<>'`]\)\@=" nextgroup=@vimMarkArg 1095 VimL syn match vimMark_ contained "k\%([a-zA-Z0-9]\>\|[[\]<>'`]\)\@=" nextgroup=@vimMarkArg 1096 VimL syn keyword vimMark contained k skipwhite nextgroup=@vimMarkArg 1097 VimL syn match vimMark_ contained "k\>" skipwhite nextgroup=@vimMarkArg 1098 syn keyword vimMark contained ma[rk] skipwhite nextgroup=@vimMarkArg 1099 syn match vimMark_ contained "ma\%[rk]\>" skipwhite nextgroup=@vimMarkArg 1100 1101 syn match vimMarkArg contained "[a-zA-Z]\>\|[[\]<>'`]" skipwhite nextgroup=vimCmdSep,vimComment 1102 syn match vimMarkArgError contained "["^.(){}0-9]" 1103 syn cluster vimMarkArg contains=vimMarkArg,vimMarkArgError 1104 1105 " :match {{{3 1106 " ====== 1107 syn keyword vimMatch contained mat[ch] skipwhite nextgroup=vimMatchGroup,vimMatchNone 1108 syn match vimMatch_ contained "mat\%[ch]\>" skipwhite nextgroup=vimMatchGroup,vimMatchNone 1109 1110 " conflicts with :match 1111 " syn keyword vimMatch contained mat[ch] skipwhite nextgroup=vimMatchGroup,vimMatchNone 1112 syn match vimMatchGroup contained "[[:alnum:]._-]\+" skipwhite nextgroup=vimMatchPattern 1113 syn case ignore 1114 syn keyword vimMatchNone contained none 1115 syn case match 1116 syn region vimMatchPattern contained 1117 \ matchgroup=Delimiter 1118 \ start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)" 1119 \ skip="\\\\\|\\\z1" 1120 \ end="\z1" 1121 \ contains=@vimSubstList 1122 \ oneline 1123 1124 " :menu {{{3 1125 " ===== 1126 " NOTE: tail comments disallowed 1127 " GEN_SYN_VIM: vimCommand menu, START_STR='syn keyword vimMenu contained', END_STR='skipwhite nextgroup=vimMenuBang,vimMenuMod,vimMenuName,vimMenuPriority,vimMenuStatus' 1128 syn keyword vimMenu contained popu[p] skipwhite nextgroup=vimMenuBang,vimMenuName 1129 syn region vimMenuRhs contained 1130 \ start="|\@!\S" 1131 \ skip=+\\\\\|\\|\|\n\s*\%(\\\|"\\ \)+ 1132 \ end="$" 1133 \ end="\ze|" 1134 \ nextgroup=vimCmdSep 1135 \ contains=@vimContinue,vimNotation 1136 syn region vimMenuRhsContinue contained 1137 \ start=+^\s*\%(\\\|"\\ \)+ 1138 \ skip=+\\\\\|\\|\|\n\s*\%(\\\|"\\ \)+ 1139 \ end="$" 1140 \ end="\ze|" 1141 \ nextgroup=vimCmdSep 1142 \ contains=@vimContinue,vimNotation 1143 syn match vimMenuName "\.\@!\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation skipwhite nextgroup=vimCmdSep,vimMenuRhs 1144 syn match vimMenuName +\.\@!\%(\\\s\|\S\)\+\ze\s*\n\s*\%(\\\|["#]\\ \)+ contained contains=vimMenuNotation,vimNotation skipwhite skipnl nextgroup=vimCmdSep,vimMenuRhsContinue 1145 syn match vimMenuNotation "&\a\|&&\|\\\s\|\\\." contained 1146 syn match vimMenuPriority "\<\d\+\%(\.\d\+\)*\>" contained skipwhite nextgroup=vimMenuName 1147 syn match vimMenuMod "\c<\%(script\|silent\|special\)>" contained skipwhite nextgroup=vimMenuName,vimMenuPriority,vimMenuMod contains=vimMapModKey,vimMapModErr 1148 syn keyword vimMenuStatus enable disable nextgroup=vimMenuName skipwhite 1149 syn match vimMenuBang "\a\@1<=!" contained skipwhite nextgroup=vimMenuName,vimMenuMod 1150 1151 syn region vimMenutranslate contained 1152 \ matchgroup=vimCommand 1153 \ start="\<menut\%[ranslate]\>" 1154 \ skip=+\\\\\|\\|\|\n\s*\%(\\\|"\\ \)+ 1155 \ end="$" 1156 \ end="\ze|" 1157 \ matchgroup=vimMenuClear 1158 \ end="\<clear\ze\s*\%(["#|]\|$\)" 1159 \ nextgroup=vimCmdSep 1160 \ contains=@vimContinue,vimMenutranslateName 1161 \ keepend 1162 \ transparent 1163 " oneline is sufficient to match the current formatting in runtime/lang/*.vim 1164 syn match vimMenutranslateName "\%(\\\s\|\S\)\+" contained contains=vimMenuNotation,vimNotation 1165 syn match vimMenutranslateComment +".*+ contained containedin=vimMenutranslate 1166 1167 " :normal {{{3 1168 " ======= 1169 " syn match vimNormal contained "\<norm\%[al]\>!\=" skipwhite nextgroup=vimNormalArg contains=vimBang 1170 syn match vimNormal contained "norm\%[al]\>!\=" skipwhite nextgroup=vimNormalArg contains=vimBang 1171 syn region vimNormalArg contained 1172 \ start="\S" 1173 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 1174 \ end="$" 1175 \ contains=@vimContinue 1176 1177 " :packadd {{{3 1178 " ======== 1179 syn keyword vimPackadd contained pa[ckadd] skipwhite nextgroup=vimPackaddBang,vimPackaddArg,vimComment,vim9Comment,vimCmdSep 1180 syn region vimPackaddArg contained 1181 \ start=+["#|]\@!\S+ 1182 \ end="\ze\s*$" 1183 \ end=+\ze\s*\\\@1<!["#|]+ 1184 \ skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 1185 \ contains=vimSpecFile,@vimWildcard 1186 \ oneline 1187 syn match vimPackaddBang contained "\a\@1<=!" skipwhite nextgroup=vimPackaddArg 1188 1189 " :profile {{{3 1190 " ======== 1191 syn match vimProfileBang contained "\a\@1<=!" skipwhite nextgroup=vimProfileArg 1192 syn keyword vimProfileArg contained start skipwhite nextgroup=vimProfilePattern 1193 syn keyword vimProfileArg contained func skipwhite nextgroup=vimProfilePattern 1194 syn keyword vimProfileArg contained file skipwhite nextgroup=vimProfilePattern 1195 syn keyword vimProfileArg contained stop pause skipwhite nextgroup=vimCmdSep,@vimComment 1196 syn keyword vimProfileArg contained continue dump skipwhite nextgroup=vimCmdSep,@vimComment 1197 " TODO: match file pattern 1198 syn region vimProfilePattern contained 1199 \ start="\S" 1200 \ skip=+\\[|"#]+ 1201 \ end="$" end=+\ze\s*[|"#]+ 1202 \ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment 1203 syn keyword vimProfile contained prof[ile] skipwhite nextgroup=vimProfileBang,vimProfileArg 1204 1205 syn keyword vimProfdelArg contained func skipwhite nextgroup=vimProfilePattern 1206 syn keyword vimProfdelArg contained file skipwhite nextgroup=vimProfilePattern 1207 syn keyword vimProfdelArg contained here skipwhite nextgroup=vimCmdSep,@vimComment 1208 syn keyword vimProfdel contained profd[el] skipwhite nextgroup=vimProfdelArg 1209 1210 " :promptfind, :promptrepl {{{3 1211 " ======================== 1212 syn region vimPromptArg contained 1213 \ start="\S" 1214 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 1215 \ end="$" 1216 \ contains=@vimContinue 1217 syn keyword vimPrompt contained promptf[ind] promptr[epl] skipwhite nextgroup=vimPromptArg 1218 1219 " :redir {{{3 1220 " ====== 1221 syn keyword vimRedir contained redi[r] skipwhite nextgroup=vimRedirBang,vimRedirFileOperator,vimRedirVariableOperator,vimRedirRegister,vimRedirEnd 1222 syn match vimRedirBang contained "\a\@1<=!" skipwhite nextgroup=vimRedirFileOperator 1223 1224 syn match vimRedirFileOperator contained ">>\=" skipwhite nextgroup=vimRedirFile 1225 syn region vimRedirFile contained 1226 \ start="\S" 1227 \ matchgroup=Normal 1228 \ end="\s*$" 1229 \ end="\s*\ze[|"]" 1230 \ nextgroup=vimCmdSep,vimComment 1231 \ contains=vimSpecFile 1232 syn match vimRedirRegisterOperator contained ">>\=" 1233 syn match vimRedirRegister contained "@[a-zA-Z*+"]" nextgroup=vimRedirRegisterOperator 1234 syn match vimRedirVariableOperator contained "=>>\=" skipwhite nextgroup=vimVar 1235 syn keyword vimRedirEnd contained END 1236 1237 " :return {{{3 1238 " ======= 1239 syn keyword vimReturn contained ret[urn] skipwhite nextgroup=@vimExprList,vimNotation 1240 1241 " :runtime {{{3 1242 " ======== 1243 syn keyword vimRuntime contained ru[ntime] skipwhite nextgroup=vimRuntimeBang,vimRuntimeWhere,vimRuntimeArgs 1244 syn keyword vimRuntimeWhere contained 1245 \ START OPT PACK ALL 1246 \ skipwhite nextgroup=vimRuntimeArgs 1247 syn region vimRuntimeArgs contained 1248 \ start=+["#|]\@!\S+ 1249 \ skip=+\s*\n\s*\%(\\\|["#]\\ \)\|^\s*["#]\\ + 1250 \ end="\ze\s*$" 1251 \ end=+\ze\s*\\\@1<!["#|]+ 1252 \ skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 1253 \ contains=@vimContinue,vimSpecFile,@vimWildcard 1254 syn match vimRuntimeBang contained "\a\@1<=!" skipwhite nextgroup=vimRuntimeWhere,vimRuntimeArgs 1255 1256 " :set {{{3 1257 " ==== 1258 syn keyword vimSet contained setl[ocal] setg[lobal] se[t] skipwhite nextgroup=vimSetBang,vimCmdSep,vimComment,vimSetArgs 1259 syn region vimSetComment contained start=+"+ skip=+\n\s*\%(\\\||"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString extend 1260 syn match vimSetCmdSep contained "|" skipwhite nextgroup=@vimCmdList,@vimFunc 1261 syn match vimSetEscape contained "\\\%(\\[|"]\|.\)" 1262 syn match vimSetBarEscape contained "\\|" 1263 syn match vimSetQuoteEscape contained +\\"+ 1264 syn region vimSetArgs contained 1265 \ start="\l\|<" 1266 \ skip=+\n\s*\%(\\\|["#]\\ \)\|^\s*"\\ + 1267 \ end=+\ze\\\@1<![|"]+ 1268 "\ assume this isn't an escaped char with backslash on the previous line 1269 \ end=+^\s*\\\ze[|"]+ 1270 \ end="\ze\s#" 1271 \ end="$" 1272 \ nextgroup=vimSetCmdSep,vimSetComment,vim9Comment 1273 \ contains=@vimContinue,vimErrSetting,vimOption,vimSetAll,vimSetTermcap 1274 \ keepend 1275 " TODO: restrict this to valid values? 1276 syn match vimOption contained "<[^>]\+>" contains=vimOption 1277 syn region vimSetEqual contained 1278 \ matchgroup=vimOper 1279 \ start="[=:]\|[-+^]=" 1280 \ skip=+\\\s\|^\s*\%(\\\|["#]\\ \)+ 1281 \ end="\ze\s" 1282 \ contains=@vimContinue,vimCtrlChar,vimEnvvar,vimNotation,vimSetSep,vimSetEscape,vimSetBarEscape,vimSetQuoteEscape 1283 syn match vimSetBang contained "\a\@1<=!" skipwhite nextgroup=vimSetAll,vimSetTermcap 1284 syn keyword vimSetAll contained all nextgroup=vimSetMod 1285 syn keyword vimSetTermcap contained termcap 1286 syn match vimSetSep contained "[,:]" 1287 syn match vimSetMod contained "\a\@1<=\%(&vim\=\|[!&?<]\)" 1288 1289 " :sleep {{{3 1290 " ====== 1291 syn keyword vimSleep contained sl[eep] skipwhite nextgroup=vimSleepBang,vimSleepArg 1292 syn match vimSleep_ contained "sl\%[eep]\>" skipwhite nextgroup=vimSleepBang,vimSleepArg 1293 syn match vimSleepBang contained "\a\@1<=!" skipwhite nextgroup=vimSleepArg 1294 syn match vimSleepArg contained "\<\%(\d\+\)\=m\=\>" 1295 1296 " :sort {{{3 1297 " ===== 1298 syn keyword vimSort contained sor[t] skipwhite nextgroup=vimSortBang,@vimSortOptions,vimSortPattern,vimCmdSep 1299 syn match vimSort_ contained "sort\=\>" skipwhite nextgroup=vimSortBang,@vimSortOptions,vimSortPattern,vimCmdSep 1300 syn match vimSortBang contained "\a\@1<=!" skipwhite nextgroup=@vimSortOptions,vimSortPattern,vimCmdSep 1301 syn match vimSortOptionsError contained "\a\+" 1302 syn match vimSortOptions contained "\<[ilur]*[nfxob]\=[ilur]*\>" skipwhite nextgroup=vimSortPattern,vimCmdSep 1303 syn region vimSortPattern contained 1304 \ matchgroup=Delimiter 1305 \ start="\z([^[:space:][:alpha:]|]\)" 1306 \ skip="\\\\\|\\\z1" 1307 \ end="\z1" 1308 \ skipwhite nextgroup=@vimSortOptions,vimCmdSep 1309 \ contains=@vimSubstList 1310 \ oneline 1311 1312 syn cluster vimSortOptions contains=vimSortOptions,vimSortOptionsError 1313 1314 " :substitute {{{3 1315 " =========== 1316 syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation 1317 syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation 1318 syn cluster vimSubstList add=vimCollection 1319 syn match vimSubst contained "\<\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\>" skipwhite nextgroup=vimSubstPat,vimSubstFlags,vimSubstCount 1320 syn match vimSubst contained "\<\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[_#]\@=" skipwhite nextgroup=vimSubstPat 1321 syn match vimSubst contained "\<\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\%(\d\+\)\@=" skipwhite nextgroup=vimSubstCount 1322 syn match vimSubst_ contained "\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\>" skipwhite nextgroup=vimSubstPat,vimSubstFlags,vimSubstCount 1323 syn match vimSubst_ contained "\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[_#]\@=" skipwhite nextgroup=vimSubstPat 1324 syn match vimSubst_ contained "\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)\%(\d\+\)\@=" skipwhite nextgroup=vimSubstCount 1325 syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags 1326 " & and # after :s are always pattern delimiters not flags 1327 syn match vimSubstFlags contained "[&cegiIlnpr#]\+" skipwhite nextgroup=vimSubstCount 1328 syn match vimSubstCount contained "\d\+\>" 1329 " TODO: Vim9 illegal separators for abbreviated :s form are [-.:], :su\%[...] required 1330 " : # is allowed but "not recommended" (see :h pattern-delimiter) 1331 syn region vimSubstPat contained 1332 \ matchgroup=vimSubstDelim 1333 \ start="\z([!#$%&'()*+,-./:;<=>?@[\]^_`{}~]\)"rs=s+1 1334 \ skip="\\\\\|\\\z1" 1335 \ end="\z1"re=e-1,me=e-1 1336 \ excludenl 1337 \ end="$" 1338 \ nextgroup=vimSubstRep4 1339 \ contains=@vimSubstList 1340 syn region vimSubstRep4 contained 1341 \ matchgroup=vimSubstDelim 1342 \ start="\z(.\)" 1343 \ skip="\\\\\|\\\z1" 1344 \ end="\z1" 1345 \ matchgroup=vimNotation 1346 \ end="<[cC][rR]>" 1347 \ excludenl 1348 \ end="$" 1349 \ contains=@vimSubstRepList 1350 \ nextgroup=vimSubstFlagErr 1351 syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass 1352 syn match vimCollClassErr contained "\[:.\{-\}:\]" 1353 syn match vimCollClass contained transparent "\%#=1\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|retu\%[rn]\|tab\|escape\|backspace\):\]" 1354 syn match vimSubstSubstr contained "\\z\=\d" 1355 syn match vimSubstTwoBS contained "\\\\" 1356 1357 " TODO: flags, unlike count, must follow immediately 1358 syn match vimSubst contained "&&\=" skipwhite nextgroup=vimSubstFlags,vimSubstCount 1359 syn match vimSubst contained "\~&\=" skipwhite nextgroup=vimSubstFlags,vimSubstCount 1360 1361 " two and three letter variants (matched as :s + flags, count may follow immediately) 1362 syn match vimSubst contained "\<sc[egiIlnp]\=\a\@!" skipwhite nextgroup=vimSubstCount contains=vimSubstFlags 1363 syn match vimSubst contained "\<sg[ceiIlnpr]\=\a\@!" skipwhite nextgroup=vimSubstCount contains=vimSubstFlags 1364 syn match vimSubst contained "\<si[ceInpr]\=\a\@!" skipwhite nextgroup=vimSubstCount contains=vimSubstFlags 1365 syn match vimSubst contained "\<sI[ceginplr]\=\a\@!" skipwhite nextgroup=vimSubstCount contains=vimSubstFlags 1366 syn match vimSubst contained "\<sr[cgiInplr]\=\a\@!" skipwhite nextgroup=vimSubstCount contains=vimSubstFlags 1367 syn match vimSubst_ contained "sc[egiIlnp]\=\a\@!" skipwhite nextgroup=vimSubstCount contains=vimSubstFlags 1368 syn match vimSubst_ contained "sg[ceiIlnpr]\=\a\@!" skipwhite nextgroup=vimSubstCount contains=vimSubstFlags 1369 syn match vimSubst_ contained "si[ceInpr]\=\a\@!" skipwhite nextgroup=vimSubstCount contains=vimSubstFlags 1370 syn match vimSubst_ contained "sI[ceginplr]\=\a\@!" skipwhite nextgroup=vimSubstCount contains=vimSubstFlags 1371 syn match vimSubst_ contained "sr[cgiInplr]\=\a\@!" skipwhite nextgroup=vimSubstCount contains=vimSubstFlags 1372 1373 " Vi compatibility 1374 syn match vimSubstDelim contained "\\" 1375 syn match vimSubstPat contained "\\\ze[/?&]" contains=vimSubstDelim nextgroup=vimSubstRep4 1376 1377 " :syntax {{{3 1378 " ======= 1379 syn region vimGroupList contained 1380 \ start="\S" 1381 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 1382 "\ need to consume the whitespace 1383 \ end="\s"he=e-1 1384 \ end="$" 1385 \ contains=@vimGroupListContinue,vimGroupSpecial,vimGroupListContinueComma 1386 syn keyword vimGroupSpecial contained ALL ALLBUT CONTAINED TOP 1387 syn match vimGroupListComma contained "," 1388 syn match vimGroupListContinueComma contained "\s\+,\s*\|,\s\+" contains=vimGroupListComma 1389 syn match vimGroupListContinueComma contained "\s*,\s*\%(\n\s*\%(\\\s\+\|["#]\\ .*\)\)\+" contains=@vimGroupListContinue,vimGroupListComma 1390 1391 syn match vimGroupListEquals contained "=" skipwhite skipnl nextgroup=vimGroupListContinueStart,vimGroupList 1392 " the first continuation line does not terminate the list at whitepace after \ 1393 syn match vimGroupListContinueStart contained "^\%(\s*["#]\\ .*\n\)*\s*\\\s\+" skipwhite nextgroup=vimGroupList contains=@vimGroupListContinue transparent 1394 1395 syn match vimGroupListContinue contained "^\s*\\" skipwhite skipnl nextgroup=@vimGroupListContinue,vimGroupListContinueComma contains=vimWhitespace 1396 syn match vimGroupListContinueComment contained '^\s*["#]\\ .*' skipwhite skipnl nextgroup=@vimGroupListContinue contains=vimWhitespace 1397 syn cluster vimGroupListContinue contains=vimGroupListContinue,vimGroupListContinueComment 1398 1399 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror") 1400 syn match vimSynError contained "\i\+" 1401 endif 1402 syn match vimSynContains contained "\<contains\>" skipwhite nextgroup=vimGroupListEquals 1403 syn match vimSynContainedin contained "\<containedin\>" skipwhite nextgroup=vimGroupListEquals 1404 syn match vimSynNextgroup contained "\<nextgroup\>" skipwhite nextgroup=vimGroupListEquals 1405 if has("conceal") 1406 " no whitespace allowed after '=' 1407 syn match vimSynCchar contained "\<cchar=" nextgroup=vimSynCcharValue 1408 syn match vimSynCcharValue contained "\S" 1409 endif 1410 1411 syn keyword vimSyntax contained sy[ntax] skipwhite nextgroup=vimSynType,@vimComment 1412 syn cluster vimFunctionBodyList add=vimSyntax 1413 1414 " :syntax case {{{3 1415 syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError 1416 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror") 1417 syn match vimSynCaseError contained "\i\+" 1418 endif 1419 syn keyword vimSynCase contained ignore match 1420 1421 " :syntax clear {{{3 1422 syn keyword vimSynType contained clear 1423 1424 " :syntax cluster {{{3 1425 syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName 1426 syn region vimClusterName contained 1427 \ keepend 1428 \ matchgroup=vimGroupName 1429 \ start="\h\w*\>" 1430 \ skip=+\\\\\|\\\|\n\s*\%(\\\|"\\ \)+ 1431 \ end="\ze|" 1432 \ end="$" 1433 \ nextgroup=vimCmdSep 1434 \ contains=@vimContinue,vimGroupAdd,vimGroupRem,vimSynContains,vimSynError 1435 syn match vimGroupAdd contained "\<add\>" skipwhite nextgroup=vimGroupListEquals 1436 syn match vimGroupRem contained "\<remove\>" skipwhite nextgroup=vimGroupListEquals 1437 1438 " :syntax conceal {{{3 1439 syn match vimSynType contained "\<conceal\>" skipwhite nextgroup=vimSynConceal,vimSynConcealError 1440 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynconcealerror") 1441 syn match vimSynConcealError contained "\i\+" 1442 endif 1443 syn keyword vimSynConceal contained on off 1444 1445 " :syntax foldlevel {{{3 1446 syn keyword vimSynType contained foldlevel skipwhite nextgroup=vimSynFoldlevel,vimSynFoldlevelError 1447 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynfoldlevelerror") 1448 syn match vimSynFoldlevelError contained "\i\+" 1449 endif 1450 syn keyword vimSynFoldlevel contained start minimum 1451 1452 " :syntax iskeyword {{{3 1453 syn keyword vimSynType contained iskeyword skipwhite nextgroup=vimSynIskeyword 1454 syn keyword vimSynIskeyword contained clear 1455 syn match vimSynIskeyword contained "\S\+" contains=vimSynIskeywordSep 1456 syn match vimSynIskeywordSep contained "," 1457 1458 " :syntax include {{{3 1459 syn keyword vimSynType contained include skipwhite nextgroup=vimSynIncludeCluster 1460 syn match vimSynIncludeCluster contained "@[_a-zA-Z0-9]\+\>" 1461 1462 " :syntax keyword {{{3 1463 syn cluster vimSynKeyGroup contains=@vimContinue,vimSynCchar,vimSynNextgroup,vimSynKeyOpt,vimSynContainedin,vimSynKeyError 1464 syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion 1465 syn region vimSynKeyRegion contained 1466 \ keepend 1467 \ matchgroup=vimGroupName 1468 \ start="\h\w*\>" 1469 \ skip=+\\\\\|\\|\|\n\s*\%(\\\|"\\ \)+ 1470 \ end="\ze|" 1471 \ end="$" 1472 \ nextgroup=vimCmdSep 1473 \ contains=@vimSynKeyGroup 1474 syn match vimSynKeyOpt contained "\%#=1\<\%(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" 1475 syn match vimSynKeyError contained "\<oneline\>" 1476 1477 1478 " :syntax match {{{3 1479 syn cluster vimSynMtchGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynContainedin,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation,vimMtchComment 1480 syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion 1481 syn region vimSynMatchRegion contained 1482 \ keepend 1483 \ matchgroup=vimGroupName 1484 \ start="\h\w*\>" 1485 \ skip=+\\\\\|\\|\|\n\s*\%(\\\|"\\ \)+ 1486 \ end="\ze|" 1487 \ end="$" 1488 \ nextgroup=vimCmdSep 1489 \ contains=@vimSynMtchGroup 1490 syn match vimSynMtchOpt contained "\%#=1\<\%(conceal\|transparent\|contained\|excludenl\|keepend\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" 1491 1492 " :syntax {{{3 1493 syn keyword vimSynType contained enable list manual off on reset 1494 1495 " :syntax region {{{3 1496 syn cluster vimSynRegPatGroup contains=@vimContinue,vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation 1497 syn cluster vimSynRegGroup contains=@vimContinue,vimSynCchar,vimSynContains,vimSynContainedin,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp 1498 syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion 1499 syn region vimSynRegion contained 1500 \ keepend 1501 \ matchgroup=vimGroupName 1502 \ start="\h\w*" 1503 \ skip=+\\\\\|\\|\|\n\s*\%(\\\|"\\ \)+ 1504 \ end="\ze|" 1505 \ end="$" 1506 \ nextgroup=vimCmdSep 1507 \ contains=@vimSynRegGroup 1508 syn match vimSynRegOpt contained "\%#=1\<\%(conceal\%(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>" 1509 syn match vimSynReg contained "\<\%(start\|skip\|end\)=" nextgroup=vimSynRegPat 1510 syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup 1511 VimExtend syn region vimSynRegPat contained 1512 \ matchgroup=Delimiter 1513 \ start="\z([-`~!@#$%^&*_=+;:'",./?]\)" 1514 \ skip=/\\\\\|\\\z1\|\n\s*\%(\\\|"\\ \)/ 1515 \ end="\z1" 1516 \ skipwhite nextgroup=vimSynPatMod,vimSynReg 1517 \ contains=@vimSynRegPatGroup 1518 syn match vimSynPatMod contained "\%#=1\%(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\%([-+]\d\+\)\=" 1519 syn match vimSynPatMod contained "\%#=1\%(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\%([-+]\d\+\)\=," nextgroup=vimSynPatMod 1520 syn match vimSynPatMod contained "lc=\d\+" 1521 syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod 1522 syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]" 1523 syn match vimSynNotPatRange contained "\\\\\|\\\[" 1524 syn match vimMtchComment contained '"[^"]\+$' 1525 1526 " :syntax spell {{{3 1527 syn keyword vimSynType contained spell skipwhite nextgroup=vimSynSpell,vimSynSpellError 1528 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynspellerror") 1529 syn match vimSynSpellError contained "\i\+" 1530 endif 1531 syn keyword vimSynSpell contained default notoplevel toplevel 1532 1533 " :syntax sync {{{3 1534 syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncClear,vimSyncMatch,vimSyncError,vimSyncRegion,vimSyncArgs 1535 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror") 1536 syn match vimSyncError contained "\i\+" 1537 endif 1538 1539 syn region vimSyncArgs contained 1540 \ start="\S" 1541 \ skip=+\\\\\|\\|\|\n\s*\%(\\\|"\\ \)+ 1542 \ end="\ze|" 1543 \ end="$" 1544 \ nextgroup=vimCmdSep 1545 \ contains=vimSyncLines,vimSyncLinebreak,vimSyncLinecont,vimSyncFromstart,vimSyncCcomment 1546 1547 syn keyword vimSyncCcomment contained ccomment skipwhite nextgroup=vimGroupName 1548 syn keyword vimSyncClear contained clear skipwhite nextgroup=vimSyncGroupName 1549 syn keyword vimSyncFromstart contained fromstart 1550 syn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName 1551 syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynRegion 1552 syn match vimSyncLinebreak contained "\<linebreaks=" nextgroup=vimNumber 1553 syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat 1554 syn match vimSyncLines contained "\<lines=" nextgroup=vimNumber 1555 syn match vimSyncLines contained "\<minlines=" nextgroup=vimNumber 1556 syn match vimSyncLines contained "\<maxlines=" nextgroup=vimNumber 1557 syn match vimSyncGroupName contained "\<\h\w*\>" skipwhite nextgroup=vimSyncKey,vimSynRegPat 1558 syn match vimSyncKey contained "\<grouphere\>" skipwhite nextgroup=vimSyncGroup 1559 syn match vimSyncKey contained "\<groupthere\>" skipwhite nextgroup=vimSyncGroup 1560 syn match vimSyncGroup contained "\<\h\w*\>" skipwhite nextgroup=vimSynRegPat,vimSyncNone 1561 syn keyword vimSyncNone contained NONE 1562 1563 " :syntime {{{3 1564 " ======== 1565 syn keyword vimSyntimeArg contained on off clear report skipwhite nextgroup=vimComment,vim9Comment,vimCmdSep 1566 syn keyword vimSyntime contained synti[me] skipwhite nextgroup=vimSyntimeArg 1567 1568 " :terminal {{{3 1569 " ========= 1570 syn match vimTerminal contained "\<ter\%[minal]\>" skipwhite nextgroup=vimTerminalOptions,vimTerminalCommand 1571 syn match vimTerminal contained +\<ter\%[minal]\>\ze\s*\n\s*\%(\\\|["#]\\ \)+ skipwhite skipnl nextgroup=vimTerminalOptions,vimTerminalCommand,@vimTerminalContinue 1572 syn match vimTerminal_ contained "ter\%[minal]\>" skipwhite nextgroup=vimTerminalOptions,vimTerminalCommand 1573 syn match vimTerminal_ contained +ter\%[minal]\>\ze\s*\n\s*\%(\\\|["#]\\ \)+ skipwhite skipnl nextgroup=vimTerminalOptions,vimTerminalCommand,@vimTerminalContinue 1574 1575 syn match vimTerminalContinue contained "^\s*\\" skipwhite skipnl nextgroup=@vimTerminalContinue,vimTerminalOptions,vimTerminalCommand contains=vimLeadingWhitespace 1576 syn match vimTerminalContinueComment contained '^\s*["#]\\ .*' skipwhite skipnl nextgroup=@vimTerminalContinue,vimTerminalOptions,vimTerminalCommand contains=vimLeadingWhitespace 1577 syn cluster vimTerminalContinue contains=vimTerminalContinue,vimTerminalContinueComment 1578 1579 syn region vimTerminalCommand contained 1580 \ start="\S" 1581 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 1582 \ end="$" 1583 \ contains=@vimContinue 1584 1585 syn region vimTerminalOptions contained 1586 \ start="++" 1587 \ skip=/\s\+++\|\%(\n\|^\)\s*\%(\\\|["#]\\ \)/ 1588 \ end="\s" 1589 \ end="$" 1590 \ skipwhite nextgroup=vimTerminalCommand 1591 \ contains=@vimContinue,vimTerminalOption 1592 \ transparent 1593 1594 syn match vimTerminalOption contained "++\%(\%(no\)\=close\|open\|curwin\|hidden\|norestore\|shell\)\>" 1595 syn match vimTerminalOption contained "++kill=" nextgroup=vimTerminalKillOptionArg 1596 syn match vimTerminalOption contained "++\%(rows\|cols\)=" nextgroup=vimTerminalSizeOptionArg 1597 syn match vimTerminalOption contained "++eof=" nextgroup=vimTerminalEofOptionArg 1598 syn match vimTerminalOption contained "++type=" nextgroup=vimTerminalTypeOptionArg 1599 syn match vimTerminalOption contained "++api=" nextgroup=vimTerminalApiOptionArg 1600 1601 syn match vimTerminalApiOptionArg contained "\<\S\+\>" 1602 syn match vimTerminalEofOptionArg contained "\<\S\+\>" 1603 syn match vimTerminalSizeOptionArg contained "\<\d\+\>" 1604 syn keyword vimTerminalKillOptionArg contained term hup quit int kill 1605 syn match vimTerminalKillOptionArg contained "\<\d\+\>" 1606 syn keyword vimTerminalTypeOptionArg contained conpty winpty 1607 1608 " :uniq {{{3 1609 " ===== 1610 syn keyword vimUniq contained uni[q] skipwhite nextgroup=vimUniqBang,@vimUniqOptions,vimUniqPattern,vimCmdSep 1611 syn match vimUniq_ contained "\<uniq\=\>" skipwhite nextgroup=vimUniqBang,@vimUniqOptions,vimUniqPattern,vimCmdSep 1612 syn match vimUniqBang contained "\a\@1<=!" skipwhite nextgroup=@vimUniqOptions,vimUniqPattern,vimCmdSep 1613 syn match vimUniqOptionsError contained "\a\+" 1614 syn match vimUniqOptions contained "\<[ilur]*\>" skipwhite nextgroup=vimUniqPattern,vimCmdSep 1615 syn region vimUniqPattern contained 1616 \ matchgroup=Delimiter 1617 \ start="\z([^[:space:][:alpha:]|]\)" 1618 \ skip="\\\\\|\\\z1" 1619 \ end="\z1" 1620 \ skipwhite nextgroup=@vimUniqOptions,vimCmdSep 1621 \ contains=@vimSubstList 1622 \ oneline 1623 1624 syn cluster vimUniqOptions contains=vimUniqOptions,vimUniqOptionsError 1625 1626 " :vimgrep, lvimgrep, :vimgrepadd, :lvimgrepadd {{{3 1627 " ============================================= 1628 syn keyword vimVimgrep contained vim[grep] lv[imgrep] skipwhite nextgroup=vimVimgrepBang,vimVimgrepPattern 1629 syn keyword vimVimgrepadd contained vimgrepa[dd] lvimgrepa[dd] skipwhite nextgroup=vimVimgrepBang,vimVimgrepPattern 1630 syn match vimVimgrep_ contained "l\=vim\%[grep]\>" skipwhite nextgroup=vimVimgrepBang,vimVimgrepPattern 1631 syn match vimVimgrepadd_ contained "l\=vimgrepa\%[dd]\>" skipwhite nextgroup=vimVimgrepBang,vimVimgrepPattern 1632 syn match vimVimgrepBang contained "\a\@1<=!" skipwhite nextgroup=vimVimgrepPattern 1633 syn region vimVimgrepPattern contained 1634 \ start="[[:ident:]]" 1635 \ end="\ze[[:space:]\n]" 1636 \ skipwhite nextgroup=vimVimgrepFile,vimCmdSep 1637 \ contains=@vimSubstList 1638 \ oneline 1639 syn region vimVimgrepPattern contained 1640 \ matchgroup=Delimiter 1641 \ start="\z([^[:space:][:ident:]|"]\)" 1642 \ skip="\\\\\|\\\z1" 1643 \ end="\z1" 1644 \ skipwhite nextgroup=vimVimgrepFlags,vimVimgrepFile,vimCmdSep 1645 \ contains=@vimSubstList 1646 \ oneline 1647 syn match vimVimgrepEscape contained "\\\%(\\|\|.\)" 1648 syn match vimVimgrepBarEscape contained "\\|" 1649 syn region vimVimgrepFile contained 1650 \ start="|\@!\S" 1651 \ end="\ze|" 1652 \ end="\ze\s" 1653 \ end="$" 1654 \ skipwhite nextgroup=vimVimgrepFile 1655 \ contains=vimSpecFile,vimVimgrepEscape,vimVimgrepBarEscape 1656 syn match vimVimgrepFlags contained "\<[gjf]\{,3\}\>" skipwhite nextgroup=vimVimgrepFile 1657 1658 " :while {{{3 1659 " ====== 1660 syn keyword vimWhile contained wh[ile] skipwhite nextgroup=@vimExprList,vimNotation 1661 1662 " :wincmd {{{3 1663 " ======= 1664 syn keyword vimWincmd contained winc[md] skipwhite nextgroup=vimWincmdArg 1665 syn match vimWincmd_ contained "winc\%[md]\>" skipwhite nextgroup=vimWincmdArg 1666 " TODO: consider extracting this list from the help file 1667 syn match vimWincmdArg contained 1668 \ "\<[sSvnqojkhlwWtbpPrRxKJHLTfFz]\>\|[\^:=\-+_<>|\]}]\|\<g\s\+[\]}]\|\<g[fFtT]\>" 1669 \ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment 1670 1671 " only handles oneline assignments 1672 " NOTE: handled with higher priority later in file 1673 " Vim9 syn match vim9Wincmd "\s\=\<winc\%[md]\>\ze\s\+=\s*\%([#|]\|$\)" skipwhite nextgroup=vimWincmdArg 1674 1675 " :write {{{3 1676 " ====== 1677 " lower priority than [wtb]: Vim9 scoped variables at SOL 1678 syn match vimWrite contained "\<w\%[rite]\>" nextgroup=vimBang 1679 syn match vimWrite_ contained "w\%[rite]\>" nextgroup=vimBang 1680 1681 " :z {{{3 1682 " == 1683 syn match vimCommand_ contained "z[-+^.=]\=\>" 1684 syn match vimCommand contained "\<z[-+^.=]\=\>" 1685 1686 " Operators: {{{2 1687 " ========= 1688 syn cluster vimOperGroup contains=@vimContinue,@vimExprList,vim9Comment,vim9LineComment,vimContinueString 1689 syn match vimOper "\a\@<!!" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile 1690 syn match vimOper "||\|&&\|[-+*/%.]" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile 1691 " syn match vimOper "?" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString 1692 syn match vimOper "\s\@1<=?\ze\s\|\s\@1<=?$" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString 1693 " distinguish ternary : from ex-colon 1694 syn match vimOper "\s\@1<=:\ze\s\|\s\@1<=:$" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString 1695 syn match vimOper "??" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString 1696 syn match vimOper "=" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile 1697 syn match vimOper "\%#=1\%(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\)[?#]\=" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile 1698 syn match vimOper "\<is\%(not\)\=\>" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile 1699 syn match vimOper "\<is\%(not\)\=[?#]" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimContinueString,vimSpecFile 1700 syn region vimOperParen 1701 \ matchgroup=vimParenSep 1702 \ start="(" 1703 \ end=")" 1704 \ nextgroup=vimSubscriptBrackets,vimSubscriptDot 1705 \ contains=@vimOperGroup 1706 syn region vimOperParen 1707 \ matchgroup=vimSep 1708 \ start="#\={" 1709 \ end="}" 1710 \ nextgroup=vimSubscriptBrackets,vimSubscriptDot,vimVar 1711 \ contains=@vimOperGroup,vimDictColon 1712 syn match vimDictColon contained ":" skipwhite nextgroup=@vimExprList 1713 syn region vimOperParen contained 1714 \ matchgroup=vimSep 1715 \ start="\[" 1716 \ end="]" 1717 \ contains=@vimOperGroup 1718 \ nextgroup=vimSubscriptBrackets,vimSubscriptDot,vimVar 1719 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") 1720 syn match vimOperError ")" 1721 endif 1722 1723 syn match vimOperContinue contained "^\s*\\" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList contains=vimLeadingWhitespace 1724 syn match vimOperContinueComment contained '^\s*["#]\\ .*' skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList contains=vimLeadingWhitespace 1725 syn cluster vimOperContinue contains=vimOperContinue,vimOperContinueComment 1726 1727 " Lambda Expressions: {{{2 1728 " ================== 1729 syn match vimLambdaOperator contained "->" skipwhite nextgroup=@vimExprList 1730 syn region vimLambda contained 1731 \ matchgroup=vimLambdaBrace 1732 \ start=+{\ze[[:space:][:alnum:]_.,]*\%(\n\s*\%(\\[[:space:][:alnum:]_.,]*\|"\\ .*\)\)*->+ 1733 \ skip=+\n\s*\%(\\\|"\\ \)+ 1734 \ end="}" end="$" 1735 \ contains=@vimContinue,@vimExprList,vimLambdaParams 1736 syn match vimLambdaParams contained "\%({\n\=\)\@1<=\_.\{-}\%(->\)\@=" nextgroup=vimLambdaOperator contains=@vimContinue,vimFunctionParam 1737 1738 syn match vim9LambdaOperator contained "=>" skipwhite skipempty nextgroup=@vimExprList,vim9LambdaBlock,vim9LambdaOperatorComment 1739 syn match vim9LambdaParen contained "[()]" 1740 syn match vim9LambdaParams contained 1741 \ "(\%(\<func(\|[^(]\)*\%(\n\s*\\\%(\<func(\|[^(]\)*\|\n\s*#\\ .*\)*\ze\s\+=>" 1742 \ skipwhite nextgroup=vim9LambdaOperator 1743 \ contains=@vim9Continue,vimDefParam,vim9LambdaParen,vim9LambdaReturnType 1744 syn region vim9LambdaReturnType contained start=")\@1<=:\s" end="\ze\s*#" end="\ze\s*=>" contains=@vim9Continue,@vimType transparent 1745 syn region vim9LambdaBlock contained matchgroup=vimSep start="{" end="^\s*\zs}" contains=@vimDefBodyList 1746 1747 syn match vim9LambdaOperatorComment contained "#.*" skipwhite skipempty nextgroup=@vimExprList,vim9LambdaBlock,vim9LambdaOperatorComment 1748 1749 " Functions: Tag is provided for those who wish to highlight tagged functions {{{2 1750 " ========= 1751 syn cluster vimFunctionBodyCommon contains=vimContinue,vimCtrlChar,vimDef,vimFBVar,vimFunction,vimNumber,vimOper,vimOperParen,vimSpecFile,vimString,vimFunctionFold,vimDefFold,vimCmdSep 1752 syn cluster vimFunctionBodyList contains=@vimFunctionBodyCommon,vimLineStart,vimComment,vimConst,vimLet 1753 syn cluster vimDefBodyList contains=@vimFunctionBodyCommon,vim9LineStart,vim9Comment,vim9Const,vim9Final,vim9Var,vim9Null,vim9Boolean,vim9For,@vimSpecialVar,@vim9Func,vim9LhsVariable_,vim9Wincmd 1754 1755 syn region vimFunctionPattern contained 1756 \ matchgroup=vimOper 1757 \ start="/" 1758 \ end="$" 1759 \ contains=@vimSubstList 1760 1761 syn match vimFunctionBang contained "\a\@1<=!" skipwhite nextgroup=vimFunctionName 1762 syn match vimDefBang contained "\a\@1<=!" skipwhite nextgroup=vimDefName 1763 syn match vimFunctionSID contained "\c<sid>" 1764 syn match vimFunctionScope contained "\<[bwglstav]:" 1765 syn match vimFunctionName contained 1766 \ "\%(<[sS][iI][dD]>\|[bwglstav]:\)\=\%([[:alnum:]_#.]\+\|{.\{-1,}}\)\+" 1767 \ skipwhite nextgroup=vimFunctionParams,vimCmdSep,vimComment,vim9Comment 1768 \ contains=vimFunctionError,vimFunctionScope,vimFunctionSID,Tag 1769 syn match vimDefName contained 1770 \ "\%(<[sS][iI][dD]>\|[bwglstav]:\)\=\%([[:alnum:]_#.]\+\|{.\{-1,}}\)\+" 1771 \ nextgroup=vimDefTypeParams,vimDefParams,vimCmdSep,vimComment,vim9Comment 1772 \ contains=vimFunctionError,vimFunctionScope,vimFunctionSID,Tag 1773 1774 syn match vimFunction contained "\<fu\%[nction]\>" skipwhite nextgroup=vimFunctionBang,vimFunctionName,vimFunctionPattern,vimCmdSep,vimComment 1775 syn match vimDef contained "\<def\>" skipwhite nextgroup=vimDefBang,vimDefName,vimFunctionPattern,vimCmdSep,vimComment 1776 1777 syn region vimFunctionComment contained 1778 \ start=+".*+ 1779 \ skip=+\n\s*\%(\\\|"\\ \)+ 1780 \ end="$" 1781 \ skipwhite skipempty nextgroup=vimFunctionBody,vimEndfunction 1782 syn region vimDefComment contained 1783 \ start="#.*" 1784 \ skip=+\n\s*\%(\\\|#\\ \)+ 1785 \ end="$" 1786 \ skipwhite skipempty nextgroup=vimDefBody,vimEnddef 1787 1788 syn region vimFunctionParams contained 1789 \ matchgroup=Delimiter 1790 \ start="(" 1791 \ skip=+\n\s*\%(\\\|"\\ \)+ 1792 \ end=")" 1793 \ skipwhite skipempty nextgroup=vimFunctionBody,vimFunctionComment,vimEndfunction,vimFunctionMod,vim9CommentError 1794 \ contains=vimFunctionParam,vimOperParen,@vimContinue 1795 syn region vimDefParams contained 1796 \ matchgroup=Delimiter 1797 \ start="(" 1798 \ end=")" 1799 \ skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimReturnType,vimCommentError 1800 \ contains=vimDefParam,vim9Comment,vimFunctionParamEquals,vimOperParen 1801 syn region vimDefTypeParams contained 1802 \ matchgroup=Delimiter 1803 \ start="<" 1804 \ end=">" 1805 \ nextgroup=vimDefParams 1806 \ contains=vim9DefTypeParam 1807 syn match vimFunctionParam contained "\<\h\w*\>\|\.\.\." skipwhite nextgroup=vimFunctionParamEquals 1808 syn match vimDefParam contained "\<\h\w*\>" skipwhite nextgroup=vimParamType,vimFunctionParamEquals 1809 syn match vim9DefTypeParam contained "\<\u\w*\>" 1810 1811 syn match vimFunctionParamEquals contained "=" skipwhite nextgroup=@vimExprList 1812 syn match vimFunctionMod contained "\<\%(abort\|closure\|dict\|range\)\>" skipwhite skipempty nextgroup=vimFunctionBody,vimFunctionComment,vimEndfunction,vimFunctionMod,vim9CommentError 1813 1814 syn region vimFunctionBody contained 1815 \ start="^." 1816 \ matchgroup=vimCommand 1817 \ end="\<endf\%[unction]\>" 1818 \ skipwhite nextgroup=vimCmdSep,vimComment,vim9CommentError 1819 \ contains=@vimFunctionBodyList 1820 syn region vimDefBody contained 1821 \ start="^." 1822 \ matchgroup=vimCommand 1823 \ end="\<enddef\>" 1824 \ skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError 1825 \ contains=@vimDefBodyList 1826 1827 syn keyword vimEndfunction contained endf[unction] skipwhite nextgroup=vimCmdSep,vimComment,vim9CommentError 1828 syn keyword vimEnddef contained enddef skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError 1829 1830 if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' 1831 VimExtend syn region vimFunctionFold contained 1832 \ start="\<fu\%[nction]!" 1833 "\ assume no dict literal in curly-brace name expressions 1834 \ start="\<fu\%[nction]\>\s*\%([[:alnum:]_:<>.#]\+\|{.\{-1,}}\)\+\s*(" 1835 \ end="^\s*:\=\s*endf\%[unction]\>" 1836 \ contains=vimFunction 1837 \ fold keepend transparent 1838 VimExtend syn region vimDefFold contained 1839 \ start="\<def!" 1840 "\ assume no dict literal in curly-brace name expressions 1841 \ start="\<def\>\s*\%([[:alnum:]_:<>.#]\+\|{.\{-1,}}\)\+[<(]" 1842 \ end="^\s*:\=\s*enddef\>" 1843 \ contains=vimDef 1844 \ fold keepend transparent 1845 endif 1846 1847 syn match vimDelfunctionBang contained "\a\@1<=!" skipwhite nextgroup=vimFunctionName 1848 syn keyword vimDelfunction contained delf[unction] skipwhite nextgroup=vimDelfunctionBang,vimFunctionName 1849 1850 " Types: {{{2 1851 " ===== 1852 1853 syn region vimReturnType contained 1854 \ start=")\@1<=:\%(\s\|\n\)\@=" 1855 \ skip=+\n\s*\%(\\\|#\\ \)\|^\s*#\\ + 1856 \ end="$" 1857 \ matchgroup=vim9Comment 1858 "\ allow for legacy script tail comment error 1859 \ end="\ze[#"]" 1860 \ skipwhite skipempty nextgroup=vimDefBody,vimDefComment,vimEnddef,vimCommentError 1861 \ contains=@vim9Continue,@vimType 1862 \ transparent 1863 syn match vimParamType contained ":\s" skipwhite skipnl nextgroup=@vimType contains=vimTypeSep 1864 1865 syn match vimTypeSep contained ":\%(\s\|\n\)\@=" skipwhite nextgroup=@vimType 1866 syn keyword vimType contained blob bool channel float job number string void 1867 syn keyword vimTypeAny contained any 1868 syn match vimTypeObject contained "\<object<\@=" nextgroup=vimTypeObjectArgs 1869 syn region vimTypeObjectArgs contained 1870 \ matchgroup=vimTypeObjectBracket 1871 \ start="<" 1872 \ end=">" 1873 \ contains=vimTypeAny,vimTypeObject,vimUserType 1874 \ oneline 1875 \ transparent 1876 syn match vimType contained "\<\%(func\)\>" 1877 syn region vimCompoundType contained matchgroup=vimType start="\<func(" end=")" nextgroup=vimTypeSep contains=@vim9Continue,@vimType transparent 1878 syn region vimCompoundType contained matchgroup=vimType start="\<tuple<" end=">" contains=@vim9Continue,@vimType transparent 1879 syn region vimCompoundType contained matchgroup=vimType start="\<\%(list\|dict\)<" end=">" contains=@vimType oneline transparent 1880 syn match vimUserType contained "\<\%(\h\w*\.\)*\u\w*\>" 1881 1882 syn cluster vimType contains=vimType,vimTypeAny,vimTypeObject,vimCompoundType,vimUserType 1883 1884 " Classes, Enums And Interfaces: {{{2 1885 " ============================= 1886 1887 if s:vim9script 1888 1889 " Methods {{{3 1890 syn match vim9MethodDef contained "\<def\>" skipwhite nextgroup=vim9MethodDefName,vim9ConstructorDefName 1891 syn match vim9MethodDefName contained "\<\h\w*\>" nextgroup=vim9MethodDefParams,vim9MethodDefTypeParams contains=@vim9MethodName 1892 syn region vim9MethodDefParams contained 1893 \ matchgroup=Delimiter start="(" end=")" 1894 \ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vim9MethodDefReturnType,vimCommentError 1895 \ contains=vimDefParam,vim9Comment,vimFunctionParamEquals 1896 syn region vim9MethodDefTypeParams contained 1897 \ matchgroup=Delimiter 1898 \ start="<" 1899 \ end=">" 1900 \ nextgroup=vim9MethodDefParams 1901 \ contains=vim9DefTypeParam 1902 1903 syn match vim9ConstructorDefName contained "\<_\=new\w*\>" 1904 \ nextgroup=vim9ConstructorDefParams,vim9ConstuctorDefTypeParams 1905 \ contains=@vim9MethodName 1906 syn match vim9ConstructorDefParam contained "\<\%(this\.\)\=\h\w*\>" 1907 \ skipwhite nextgroup=vimParamType,vimFunctionParamEquals 1908 \ contains=vim9This,vimOper 1909 syn region vim9ConstructorDefParams contained 1910 \ matchgroup=Delimiter start="(" end=")" 1911 \ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vimCommentError 1912 \ contains=vim9ConstructorDefParam,vim9Comment,vimFunctionParamEquals 1913 syn region vim9ConstuctorDefTypeParams contained 1914 \ matchgroup=Delimiter 1915 \ start="<" 1916 \ end=">" 1917 \ nextgroup=vim9ConstructorDefParams 1918 \ contains=vim9DefTypeParam 1919 1920 syn region vim9MethodDefReturnType contained 1921 \ start=")\@1<=:\%(\s\|\n\)\@=" 1922 \ skip=+\n\s*\%(\\\|#\\ \)\|^\s*#\\ + 1923 \ end="$" 1924 \ matchgroup=vim9Comment 1925 \ end="\ze#" 1926 \ skipwhite skipnl nextgroup=vim9MethodDefBody,vim9MethodDefComment,vimEnddef,vimCommentError 1927 \ contains=@vim9Continue,vimType,vimTypeSep 1928 \ transparent 1929 1930 syn region vim9MethodDefComment contained 1931 \ start="#.*" 1932 \ skip=+\n\s*\%(\\\|#\\ \)+ 1933 \ end="$" 1934 \ skipwhite skipempty nextgroup=vim9MethodDefBody,vimEnddef 1935 1936 syn region vim9MethodDefBody contained 1937 \ start="^.\=" matchgroup=vimCommand end="\<enddef\>" 1938 \ skipwhite nextgroup=vimCmdSep,vim9Comment,vimCommentError 1939 \ contains=@vim9MethodDefBodyList 1940 1941 syn cluster vim9MethodDefBodyList contains=@vimDefBodyList,vim9This,vim9Super 1942 1943 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") 1944 syn match vim9MethodNameError contained "\<[a-z0-9]\i\>" 1945 endif 1946 syn match vim9MethodName contained "\<_\=new\w*\>" 1947 syn keyword vim9MethodName contained empty len string 1948 1949 syn cluster vim9MethodName contains=vim9MethodName,vim9MethodNameError 1950 1951 if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' 1952 VimExtend syn region vim9MethodDefFold contained 1953 \ start="\%(^\s*\%(:\=static\s\+\)\=\)\@16<=:\=def\s\+\h\w*[<(]" 1954 \ end="^\s*:\=enddef\>" 1955 \ contains=vim9MethodDef 1956 \ fold keepend transparent 1957 endif 1958 1959 syn cluster vim9MethodDef contains=vim9MethodDef,vim9MethodDefFold 1960 1961 " Classes {{{3 1962 syn cluster vim9ClassBodyList contains=vim9Abstract,vim9Class,vim9Comment,vim9LineComment,@vim9Continue,@vimExprList,vim9Extends,vim9Implements,@vim9MethodDef,vim9Public,vim9Static,vim9Const,vim9Final,vim9This,vim9Super,vim9Var 1963 1964 syn match vim9Class contained "\<class\>" skipwhite nextgroup=vim9ClassName 1965 syn match vim9ClassName contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9Extends,vim9Implements 1966 syn match vim9SuperClass contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9Implements 1967 syn match vim9ImplementedInterface contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9InterfaceListComma,vim9Extends 1968 syn match vim9InterfaceListComma contained "," skipwhite skipnl nextgroup=vim9ImplementedInterface 1969 syn keyword vim9Abstract contained abstract skipwhite skipnl nextgroup=vim9ClassBody,vim9AbstractDef 1970 syn keyword vim9Extends contained extends skipwhite skipnl nextgroup=vim9SuperClass 1971 syn keyword vim9Implements contained implements skipwhite skipnl nextgroup=vim9ImplementedInterface 1972 syn keyword vim9Public contained public 1973 syn keyword vim9Static contained static 1974 " FIXME: don't match as dictionary keys, remove when operators are not 1975 " shared between Vim9 and legacy script 1976 syn match vim9This contained "\.\@1<!\<this\>:\@!" 1977 " super must be followed by '.' 1978 syn match vim9Super contained "\.\@1<!\<super\.\@=" 1979 1980 VimFoldc syn region vim9ClassBody contained 1981 \ start="\<class\>" 1982 \ matchgroup=vimCommand 1983 \ end="\<endclass\>" 1984 \ contains=@vim9ClassBodyList 1985 \ transparent 1986 1987 " Enums {{{3 1988 syn cluster vim9EnumBodyList contains=vim9Comment,vim9LineComment,@vim9Continue,vim9Enum,@vimExprList,@vim9MethodDef,vim9Public,vim9Static,vim9Const,vim9Final,vim9This,vim9Var 1989 1990 syn match vim9Enum contained "\<enum\>" skipwhite nextgroup=vim9EnumName 1991 1992 syn match vim9EnumName contained "\<\u\w*\>" skipwhite skipempty nextgroup=vim9EnumNameTrailing,vim9EnumNameEmpty,vim9EnumNameComment,@vim9EnumNameContinue,vim9EnumImplements 1993 syn match vim9EnumNameTrailing contained "\S.*" 1994 syn region vim9EnumNameComment contained 1995 \ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$" 1996 \ skipwhite skipempty nextgroup=vim9EnumNameComment,vim9EnumValue 1997 \ contains=@vimCommentGroup,vimCommentString 1998 " vim9EnumName's "skipempty" should only apply to comments and enum values and not implements clauses 1999 syn match vim9EnumNameEmpty contained "^" skipwhite skipempty nextgroup=vim9EnumNameComment,vim9EnumValue 2000 " allow line continuation between enum name and "implements" 2001 syn match vim9EnumNameContinue contained 2002 \ "^\s*\\" 2003 \ skipwhite skipnl nextgroup=vim9EnumNameTrailing,vim9EnumNameEmpty,vim9EnumNameComment,@vim9EnumNameContinue,vim9EnumImplements 2004 \ contains=vimLeadingWhitespace 2005 syn match vim9EnumNameContinueComment contained 2006 \ "^\s*#\\ .*" 2007 \ skipwhite skipnl nextgroup=vim9EnumNameEmpty,vim9EnumNameComment,@vim9EnumNameContinue 2008 \ contains=vimLeadingWhitespace 2009 syn cluster vim9EnumNameContinue contains=vim9EnumNameContinue,vim9EnumNameContinueComment 2010 2011 " enforce enum value list location 2012 syn match vim9EnumValue contained "\<\a\w*\>" nextgroup=vim9EnumValueTypeArgs,vim9EnumValueArgList,vim9EnumValueListComma,vim9Comment 2013 syn match vim9EnumValueListComma contained "," skipwhite skipempty nextgroup=vim9EnumValue,vim9EnumValueListCommaComment 2014 syn region vim9EnumValueListCommaComment contained 2015 \ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$" 2016 \ skipwhite skipempty nextgroup=vim9EnumValueListCommaComment,vim9EnumValue 2017 \ contains=@vimCommentGroup,vimCommentString 2018 syn region vim9EnumValueTypeArgs contained 2019 \ matchgroup=Delimiter 2020 \ start="<\ze\a" 2021 \ end=">" 2022 \ nextgroup=vim9EnumValueArgList 2023 \ contains=@vimType 2024 \ oneline 2025 syn region vim9EnumValueArgList contained 2026 \ matchgroup=vimParenSep start="(" end=")" 2027 \ nextgroup=vim9EnumValueListComma 2028 \ contains=@vimExprList,vimContinueString,vim9Comment 2029 2030 syn keyword vim9EnumImplements contained implements skipwhite nextgroup=vim9EnumImplementedInterface 2031 syn match vim9EnumImplementedInterface contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9EnumInterfaceListComma,vim9EnumImplementedInterfaceComment,vim9EnumValue 2032 syn match vim9EnumInterfaceListComma contained "," skipwhite nextgroup=vim9EnumImplementedInterface 2033 syn region vim9EnumImplementedInterfaceComment contained 2034 \ start="#" skip="\n\s*\%(\\\|#\\ \)" end="$" 2035 \ skipwhite skipempty nextgroup=vim9EnumImplementedInterfaceComment,vim9EnumValue 2036 \ contains=@vimCommentGroup,vimCommentString 2037 2038 VimFolde syn region vim9EnumBody contained 2039 \ start="\<enum\>" 2040 \ matchgroup=vimCommand 2041 \ end="\<endenum\>" 2042 \ contains=@vim9EnumBodyList 2043 \ transparent 2044 2045 " Interfaces {{{3 2046 " TODO: limit to decl only - no init values 2047 syn cluster vim9InterfaceBodyList contains=vim9Comment,vim9LineComment,@vim9Continue,vim9Extends,vim9Interface,vim9AbstractDef,vim9Var 2048 2049 syn match vim9Interface contained "\<interface\>" skipwhite nextgroup=vim9InterfaceName 2050 syn match vim9InterfaceName contained "\<\u\w*\>" skipwhite skipnl nextgroup=vim9Extends 2051 2052 syn keyword vim9AbstractDef contained def skipwhite nextgroup=vim9AbstractDefName 2053 syn match vim9AbstractDefName contained "\<\h\w*\>" skipwhite nextgroup=vim9AbstractDefParams,vim9AbstractDefTypeParams contains=@vim9MethodName 2054 syn region vim9AbstractDefParams contained 2055 \ matchgroup=Delimiter start="(" end=")" 2056 \ skipwhite skipnl nextgroup=vimDefComment,vim9AbstractDefReturnType,vimCommentError 2057 \ contains=vimDefParam,vim9Comment,vimFunctionParamEquals 2058 syn region vim9AbstractDefReturnType contained 2059 \ start=")\@1<=:\s" end="$" matchgroup=vim9Comment end="\ze[#"]" 2060 \ skipwhite skipnl nextgroup=vimDefComment,vimCommentError 2061 \ contains=vimTypeSep 2062 \ transparent 2063 syn region vim9AbstractDefTypeParams contained 2064 \ matchgroup=Delimiter 2065 \ start="<" 2066 \ end=">" 2067 \ nextgroup=vim9AbstractDefParams 2068 \ contains=vim9DefTypeParam 2069 2070 VimFoldi syn region vim9InterfaceBody contained 2071 \ start="\<interface\>" 2072 \ matchgroup=vimCommand 2073 \ end="\<endinterface\>" 2074 \ contains=@vim9InterfaceBodyList 2075 \ transparent 2076 2077 " Type Aliases {{{3 2078 syn keyword vim9Type contained ty[pe] skipwhite nextgroup=vim9TypeAlias,vim9TypeAliasError 2079 syn match vim9TypeAlias contained "\<\u\w*\>" skipwhite nextgroup=vim9TypeEquals 2080 syn match vim9TypeEquals contained "=" skipwhite nextgroup=@vimType 2081 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_notypealiaserror") 2082 syn match vim9TypeAliasError contained "\<\l\w*\>" skipwhite nextgroup=vim9TypeEquals 2083 endif 2084 endif 2085 2086 " Blocks: {{{2 2087 " ====== 2088 syn region vim9Block contained 2089 \ matchgroup=vimSep 2090 \ start="{\ze\s*\%($\|[#|]\)" 2091 \ end="^\s*\zs}" 2092 \ end="\%(\\\@<!|\s*\)\=\zs}" 2093 \ skipwhite nextgroup=vim9Comment,vimCmdSep 2094 \ contains=@vimDefBodyList 2095 2096 " Special Filenames, Modifiers, Extension Removal: {{{2 2097 " =============================================== 2098 syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod 2099 syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod 2100 syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod 2101 syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod 2102 syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod 2103 syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod 2104 syn match vimSpecFileMod "\(:[phtre]\)\+" contained 2105 2106 syn match vimSpecFile contained "%[ \t:]"me=e-1 nextgroup=vimSpecFileMod 2107 syn match vimSpecFile contained excludenl "%$" nextgroup=vimSpecFileMod 2108 syn match vimSpecFile contained "%<"me=e-1 nextgroup=vimSpecFileMod 2109 2110 " Lower Priority Comments: after some vim commands... {{{2 2111 " ======================= 2112 if get(g:, "vimsyn_comment_strings", 1) 2113 VimExtend syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' 2114 endif 2115 2116 if s:vim9script 2117 syn cluster vimComment contains=vim9Comment 2118 else 2119 syn cluster vimComment contains=vimComment 2120 endif 2121 2122 VimExtend VimL syn region vimComment 2123 \ excludenl 2124 \ start=+"+ 2125 \ skip=+\n\s*\%(\\\|"\\ \)+ 2126 \ end="$" 2127 \ contains=@vimCommentGroup,vimCommentString 2128 VimExtend Vim9 syn region vim9Comment 2129 \ excludenl 2130 \ start="\%#=1\s\@1<=#\%({\@!\|{{\)" 2131 \ skip="\n\s*\%(\\\|#\\ \)" 2132 \ end="$" 2133 \ contains=@vimCommentGroup,vimCommentString 2134 2135 syn match vim9CommentError contained "#.*" 2136 syn match vimCommentError contained +".*+ 2137 2138 " Environment Variables: {{{2 2139 " ===================== 2140 syn match vimEnvvar "\$\I\i*" 2141 syn match vimEnvvar "\${\I\i*}" 2142 2143 " Strings {{{2 2144 " ======= 2145 2146 " In-String Specials: 2147 " Try to catch strings, if nothing else matches (therefore it must precede the others!) 2148 " vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside []) 2149 " syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1 2150 syn match vimPatSepErr contained "\\)" 2151 syn match vimPatSep contained "\\|" 2152 syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\=\ze(" skip="\\\\" end="\\)\|[^\\]['"]" contains=@vimStringGroup 2153 syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline 2154 syn match vimNotPatSep contained "\\\\" 2155 syn cluster vimStringGroup contains=vimEscape,vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell 2156 VimExtend syn region vimString oneline keepend matchgroup=vimString start=+[^a-zA-Z\\@]"+lc=1 skip=+\\\\\|\\"+ matchgroup=vimStringEnd end=+"+ nextgroup=vimSubscriptBrackets contains=@vimStringGroup 2157 VimExtend syn region vimString oneline matchgroup=vimString start=+[^a-zA-Z\\@]'+lc=1 end=+'+ nextgroup=vimSubscriptBrackets contains=vimQuoteEscape 2158 "syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup " see tst45.vim 2159 2160 syn match vimEscape contained "\\." 2161 " syn match vimEscape contained +\\[befnrt\"]+ 2162 syn match vimEscape contained "\\\o\{1,3}\|\\[xX]\x\{1,2}\|\\u\x\{1,4}\|\\U\x\{1,8}" 2163 syn match vimEscape contained "\\<" contains=vimNotation 2164 syn match vimEscape contained "\\<\*[^>]*>\=>" 2165 syn match vimQuoteEscape contained "''" 2166 2167 VimExtend syn region vimString oneline matchgroup=vimString start=+$'+ end=+'+ nextgroup=vimSubscriptBrackets contains=@vimStringInterpolation,vimQuoteEscape 2168 VimExtend syn region vimString oneline matchgroup=vimString start=+$"+ end=+"+ nextgroup=vimSubscriptBrackets contains=@vimStringInterpolation,@vimStringGroup 2169 syn region vimStringInterpolationExpr oneline contained matchgroup=vimSep start=+{+ end=+}+ contains=@vimExprList 2170 syn match vimStringInterpolationBrace contained "{{" 2171 syn match vimStringInterpolationBrace contained "}}" 2172 syn cluster vimStringInterpolation contains=vimStringInterpolationExpr,vimStringInterpolationBrace 2173 2174 syn region vimContinueString contained matchgroup=vimContinueString start=+"+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+"+ end="$" skipwhite nextgroup=vimSubscriptBrackets,vimComment,vimOper contains=@vimContinue,@vimStringGroup 2175 syn region vimContinueString contained matchgroup=vimContinueString start=+'+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+'+ end="$" skipwhite nextgroup=vimSubscriptBrackets,vimComment,vimOper contains=@vimContinue,vimQuoteEscape 2176 syn region vimContinueString contained matchgroup=vimContinueString start=+$"+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+"+ end="$" skipwhite nextgroup=vimSubscriptBrackets,vimComment,vimOper contains=@vimContinue,@vimStringInterpolation,@vimStringGroup 2177 syn region vimContinueString contained matchgroup=vimContinueString start=+$'+ skip=+\n\s*\%(\\\|["#]\\ \)+ end=+'+ end="$" skipwhite nextgroup=vimSubscriptBrackets,vimComment,vimOper contains=@vimContinue,@vimStringInterpolation,vimQuoteEscape 2178 2179 " Registers, Addresses, Filters: {{{2 2180 syn match vimLetRegister contained '@["@0-9\-a-zA-Z:.%#=*+~_/]' 2181 2182 " TODO: match this as a contained ex command 2183 syn match vimFilter "^!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile 2184 syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile 2185 syn match vimComFilter contained "|!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile 2186 2187 " Variable Declarations: {{{2 2188 " ===================== 2189 VimL syn keyword vimLet contained let skipwhite nextgroup=@vimSpecialVar,vimVar,vimVarList,vimLetVar 2190 VimL syn keyword vimConst contained cons[t] skipwhite nextgroup=@vimSpecialVar,vimVar,vimVarList,vimLetVar 2191 syn region vimVarList contained 2192 \ start="\[" end="]" 2193 \ skipwhite nextgroup=vimLetHeredoc 2194 \ contains=@vimContinue,@vimSpecialVar,vimVar 2195 syn match vimLetVar contained "\<\%([bwglstav]:\)\=\h[a-zA-Z0-9#_]*\>\ze\%(\[.*]\)\=\s*=<<" skipwhite nextgroup=vimLetVarSubscript,vimLetHeredoc contains=vimVarScope,vimSubscriptBrackets 2196 2197 syn region vimLetVarSubscript contained 2198 \ matchgroup=vimSubscriptBracket 2199 \ start="\S\@1<=\[" 2200 \ end="]" 2201 \ skipwhite nextgroup=vimLetVarSubscript,vimLetHeredoc 2202 \ contains=@vimExprList 2203 2204 syn keyword vimUnlet contained unl[et] skipwhite nextgroup=vimUnletBang,vimUnletVars 2205 syn match vimUnletBang contained "\a\@1<=!" skipwhite nextgroup=vimUnletVars 2206 syn region vimUnletVars contained 2207 \ start="$\I\|\h" skip=+\n\s*\%(\\\|["#]\\ \)\|^\s*["#]\\ + end="$" end=+\ze\s*[|"#]+ 2208 \ skipwhite nextgroup=vimCmdSep,vimComment,vim9Comment 2209 \ contains=@vimContinue,vimEnvvar,vimVar,vimVimVar 2210 2211 " TODO: type error after register or environment variables (strings) 2212 VimExtend VimFoldh syn region vimLetHeredoc contained 2213 \ matchgroup=vimLetHeredocStart 2214 \ start="\%(^\z(\s*\)\S.*\)\@<==<<\s*trim\%(\s\+\)\@>\z(\L\S*\)" 2215 \ matchgroup=vimLetHeredocStop 2216 \ end="^\z1\=\z2$" 2217 VimExtend VimFoldh syn region vimLetHeredoc contained 2218 \ matchgroup=vimLetHeredocStart 2219 \ start="=<<\%(\s*\)\@>\z(\L\S*\)" 2220 \ matchgroup=vimLetHeredocStop end="^\z1$" 2221 VimExtend VimFoldh syn region vimLetHeredoc contained 2222 \ matchgroup=vimLetHeredocStart 2223 \ start="\%(^\z(\s*\)\S.*\)\@<==<<\s*\%(trim\s\+eval\|eval\s\+trim\)\%(\s\+\)\@>\z(\L\S*\)" 2224 \ matchgroup=vimLetHeredocStop 2225 \ end="^\z1\=\z2$" 2226 \ contains=@vimStringInterpolation 2227 VimExtend VimFoldh syn region vimLetHeredoc contained 2228 \ matchgroup=vimLetHeredocStart 2229 \ start="=<<\s*eval\%(\s\+\)\@>\z(\L\S*\)" 2230 \ matchgroup=vimLetHeredocStop 2231 \ end="^\z1$" 2232 \ contains=@vimStringInterpolation 2233 2234 Vim9 syn keyword vim9Const contained const skipwhite nextgroup=vim9Variable,vim9VariableList 2235 Vim9 syn keyword vim9Final contained final skipwhite nextgroup=vim9Variable,vim9VariableList 2236 Vim9 syn keyword vim9Var contained var skipwhite nextgroup=vim9Variable,vim9VariableList 2237 2238 syn match vim9Variable contained "\<\h\w*\>" skipwhite nextgroup=vim9VariableTypeSep,vimLetHeredoc,vimOper 2239 syn region vim9VariableList contained start="\[" end="]" contains=@vimContinue,@vimSpecialVar,vim9Variable skipwhite nextgroup=vimLetHeredoc 2240 2241 syn match vim9VariableTypeSep contained "\S\@1<=:\%(\s\|\n\)\@=" skipwhite nextgroup=@vim9VariableType 2242 syn keyword vim9VariableType contained blob bool channel float job number string void skipwhite nextgroup=vimLetHeredoc 2243 syn keyword vim9VariableTypeAny contained any skipwhite nextgroup=vimLetHeredoc 2244 syn match vim9VariableTypeObject contained "\<object<\@=" nextgroup=vim9VariableTypeObjectArgs 2245 syn region vim9VariableTypeObjectArgs contained 2246 \ matchgroup=vim9VariableTypeObjectBracket 2247 \ start="<" 2248 \ end=">" 2249 \ contains=vimTypeAny,vimTypeObject,vimUserType 2250 \ oneline 2251 \ transparent 2252 syn match vim9VariableType contained "\<\%(func\)\>" skipwhite nextgroup=vimLetHeredoc 2253 syn region vim9VariableCompoundType contained 2254 \ matchgroup=vim9VariableType 2255 \ start="\<func(" 2256 \ end=")" 2257 \ skipwhite nextgroup=vim9VariableTypeSep,vimLetHeredoc 2258 \ contains=@vim9Continue,@vim9VariableType 2259 \ transparent 2260 syn region vim9VariableCompoundType contained 2261 \ matchgroup=vim9VariableType 2262 \ start="\<tuple<" 2263 \ end=">" 2264 \ skipwhite nextgroup=vimLetHeredoc 2265 \ contains=@vim9Continue,@vim9VariableType 2266 \ transparent 2267 syn region vim9VariableCompoundType contained 2268 \ matchgroup=vim9VariableType 2269 \ start="\<\%(list\|dict\)<" 2270 \ end=">" 2271 \ skipwhite nextgroup=vimLetHeredoc 2272 \ contains=@vim9VariableType 2273 \ oneline 2274 \ transparent 2275 syn match vim9VariableUserType contained "\<\%(\h\w*\.\)*\u\w*\>" skipwhite nextgroup=vimLetHeredoc 2276 2277 syn cluster vim9VariableType contains=vim9VariableType,vim9VariableTypeAny,vim9VariableTypeObject,vim9VariableCompoundType,vim9VariableUserType 2278 2279 " Filename Patterns: {{{2 2280 " ================= 2281 2282 syn match vimWildcardQuestion contained "?" 2283 syn match vimWildcardStar contained "*" 2284 2285 syn match vimWildcardBraceComma contained "," 2286 syn region vimWildcardBrace contained 2287 \ matchgroup=vimWildcard 2288 \ start="{" 2289 \ end="}" 2290 \ contains=vimWildcardEscape,vimWildcardBrace,vimWildcardBraceComma,vimWildcardQuestion,vimWildcardStar,vimWildcardBracket 2291 \ oneline 2292 2293 syn match vimWildcardIntervalNumber contained "\d\+" 2294 syn match vimWildcardInterval contained "\\\\\\{\d\+\%(,\d\+\)\=\\}" contains=vimWildcardIntervalNumber 2295 2296 2297 syn match vimWildcardBracket contained "\[\%(\^\=]\=\%(\\.\|\[\([:.=]\)[^:.=]\+\1]\|[^][:space:]]\)*\)\@>]" 2298 \ contains=vimWildcardBracketStart,vimWildcardEscape 2299 2300 syn match vimWildcardBracketCharacter contained "." nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketHyphen,vimWildcardBracketEnd 2301 syn match vimWildcardBracketRightBracket contained "]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd 2302 syn match vimWildcardBracketHyphen contained "-]\@!" nextgroup=@vimWildcardBracketCharacter 2303 syn match vimWildcardBracketEscape contained "\\." nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketHyphen,vimWildcardBracketEnd 2304 syn match vimWildcardBracketCharacterClass contained "\[:[^:]\+:]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd 2305 syn match vimWildcardBracketEquivalenceClass contained "\[=[^=]\+=]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd 2306 syn match vimWildcardBracketCollatingSymbol contained "\[\.[^.]\+\.]" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketEnd 2307 2308 syn match vimWildcardBracketStart contained "\[" nextgroup=vimWildcardBracketCaret,vimWildcardBracketRightBracket,@vimWildcardBracketCharacter 2309 syn match vimWildcardBracketCaret contained "\^" nextgroup=@vimWildcardBracketCharacter,vimWildcardBracketRightBracket 2310 syn match vimWildcardBracketEnd contained "]" 2311 2312 syn cluster vimWildcardBracketCharacter contains=vimWildcardBracketCharacter,vimWildcardBracketEscape,vimWildcardBracketCharacterClass,vimWildcardBracketEquivalenceClass,vimWildcardBracketCollatingSymbol 2313 2314 syn match vimWildcardEscape contained "\\." 2315 2316 syn cluster vimWildcard contains=vimWildcardQuestion,vimWildcardStar,vimWildcardBrace,vimWildcardBracket,vimWildcardInterval 2317 2318 " Angle-Bracket Notation: (tnx to Michael Geddes) {{{2 2319 " ====================== 2320 syn case ignore 2321 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}x\=\%(f\d\{1,2}\|[^ \t:]\|space\|bar\|bslash\|nl\|newline\|lf\|linefeed\|cr\|retu\%[rn]\|enter\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|csi\|right\|paste\%(start\|end\)\|left\|help\|undo\|k\=insert\|ins\|mouse\|[kz]\=home\|[kz]\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\%(page\)\=\%(\|down\|up\|k\d\>\)\)>" contains=vimBracket 2322 2323 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(net\|dec\|jsb\|pterm\|urxvt\|sgr\)mouse>" contains=vimBracket 2324 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}\%(left\|middle\|right\)\%(mouse\|drag\|release\)>" contains=vimBracket 2325 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}left\%(mouse\|release\)nm>" contains=vimBracket 2326 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}x[12]\%(mouse\|drag\|release\)>" contains=vimBracket 2327 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}sgrmouserelease>" contains=vimBracket 2328 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}mouse\%(up\|down\|move\)>" contains=vimBracket 2329 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd2-4]-\)\{0,4}scrollwheel\%(up\|down\|right\|left\)>" contains=vimBracket 2330 2331 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(sid\|nop\|nul\|lt\|drop\)>" contains=vimBracket 2332 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%(snr\|plug\|cursorhold\|ignore\|cmd\|scriptcmd\|focus\%(gained\|lost\)\)>" contains=vimBracket 2333 " syn match vimNotation contained '\%(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket 2334 syn match vimNotation contained '\%#=1\%(\\\|<lt>\)\=<\%([fq]-\)\=\%(line[12]\|count\|bang\|reg\|args\|mods\|lt\)>' contains=vimBracket skipwhite nextgroup=vimSubst 2335 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([cas]file\|abuf\|amatch\|cexpr\|cword\|cWORD\|client\|stack\|script\|sf\=lnum\)>" contains=vimBracket 2336 syn match vimNotation contained "\%#=1\%(\\\|<lt>\)\=<\%([scamd]-\)\{0,4}char-\%(\d\+\|0\o\+\|0x\x\+\)>" contains=vimBracket 2337 2338 syn match vimBracket contained "[\\<>]" 2339 syn case match 2340 2341 " User Command Highlighting: {{{2 2342 " Note: assumes command runs to EOL, no explicit | support 2343 2344 syn match vimUsrCmd contained '\%#=1\<\u[[:alnum:]]*\%([![:blank:]]\|$\)\@=' skipwhite nextgroup=vimUsrCmdBang,vimUsrCmdArgs 2345 syn match vimUsrCmd_ contained '\%#=1\%(\%(N\%[ext]\|P\%[rint]\|X\)\>\)\@!\u[[:alnum:]]*\%([![:blank:]]\|$\)\@=' skipwhite nextgroup=vimUsrCmdBang,vimUsrCmdArgs 2346 syn match vimUsrCmdBang contained "\w\@1<=!" skipwhite nextgroup=vimUsrCmdArgs 2347 syn region vimUsrCmdArgs contained 2348 \ start="\s\zs\S" 2349 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 2350 \ end="$" 2351 \ contains=@vimContinue 2352 2353 " Vim user commands 2354 2355 " Compiler plugins 2356 syn keyword vimCompilerSet contained CompilerSet skipwhite nextgroup=vimSetArgs 2357 2358 " runtime/makemenu.vim 2359 syn keyword vimSynMenu contained SynMenu skipwhite nextgroup=vimSynMenuPath 2360 syn match vimSynMenuPath contained ".*\ze:" nextgroup=vimSynMenuColon contains=vimMenuNotation 2361 syn match vimSynMenuColon contained ":" nextgroup=vimSynMenuName 2362 syn match vimSynMenuName contained "\w\+" 2363 2364 " runtime/syntax/syncolor.vim 2365 syn keyword vimSynColor contained SynColor skipwhite nextgroup=vimSynColorGroup 2366 syn match vimSynColorGroup contained "\<\h\w*\>" skipwhite nextgroup=vimHiKeyList contains=vimGroup 2367 syn keyword vimSynLink contained SynLink skipwhite nextgroup=vimSynLinkGroup 2368 syn match vimSynLinkGroup contained "\<\h\w*\>" skipwhite nextgroup=vimGroup contains=vimGroup 2369 2370 " runtime/syntax/vim.vim 2371 syn keyword vimVim9 contained Vim9 skipwhite nextgroup=@vimExUserCmdList,vimSyntax 2372 syn keyword vimVimL contained VimL skipwhite nextgroup=@vimExUserCmdList,vimSyntax 2373 syn keyword vimVimExtend contained VimExtend skipwhite nextgroup=@vimExUserCmdList,vimSyntax 2374 syn match vimVimFold contained "\<VimFold\a\>" skipwhite nextgroup=@vimExUserCmdList,vimSyntax 2375 2376 syn cluster vimExUserCmdList contains=vimCompilerSet,vimSynColor,vimSynLink,vimSynMenu,vimVimExtend,vimVimFold,vimVim9,vimVimL 2377 2378 " Errors And Warnings: {{{2 2379 " ==================== 2380 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") 2381 syn match vimFunctionError contained "[[:space:]!]\@1<=\<[a-z0-9]\w\{-}\ze\s*(" 2382 syn match vimFunctionError contained "\%(<[sS][iI][dD]>\|[sg]:\)\d\w\{-}\ze\s*(" 2383 syn match vimElseIfErr "\<else\s\+if\>" 2384 syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/ 2385 endif 2386 2387 " Control Characters: {{{2 2388 " ================== 2389 syn match vimCtrlChar "[--]" 2390 2391 " Embedded Scripts: {{{2 2392 " ================ 2393 " perl,ruby : Benoit Cerrina 2394 " python,tcl : Johannes Zellner 2395 " mzscheme, lua : Charles Campbell 2396 2397 " Allows users to specify the type of embedded script highlighting 2398 " they want: (lua/mzscheme/perl/python/ruby/tcl support) 2399 " g:vimsyn_embed == 0 : don't embed any scripts 2400 " g:vimsyn_embed =~# 'l' : embed Lua 2401 " g:vimsyn_embed =~# 'm' : embed MzScheme 2402 " g:vimsyn_embed =~# 'p' : embed Perl 2403 " g:vimsyn_embed =~# 'P' : embed Python 2404 " g:vimsyn_embed =~# 'r' : embed Ruby 2405 " g:vimsyn_embed =~# 't' : embed Tcl 2406 2407 let s:interfaces = get(g:, "vimsyn_embed", "lP") 2408 2409 " [-- lua --] {{{3 2410 if s:interfaces =~# 'l' 2411 syn include @vimLuaScript syntax/lua.vim 2412 unlet b:current_syntax 2413 endif 2414 2415 syn keyword vimLua contained lua skipwhite nextgroup=vimLuaHeredoc,vimLuaStatement 2416 syn keyword vimLua contained luado skipwhite nextgroup=vimLuaStatement 2417 syn keyword vimLua contained luafile 2418 syn match vimLua_ contained "lua\>" skipwhite nextgroup=vimLuaHeredoc,vimLuaStatement 2419 syn match vimLua_ contained "luado\>" skipwhite nextgroup=vimLuaStatement 2420 syn match vimLua_ contained "luafile\>" 2421 2422 syn region vimLuaStatement contained 2423 \ start="\S" 2424 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 2425 \ end="$" 2426 \ contains=@vimLuaScript,@vimContinue 2427 VimFoldl syn region vimLuaHeredoc contained 2428 \ matchgroup=vimScriptHeredocStart 2429 \ start=+<<\s*\z(\S\+\)\ze\s*$+ 2430 \ matchgroup=vimScriptHeredocStop 2431 \ end=+^\z1$+ 2432 \ contains=@vimLuaScript 2433 VimFoldl syn region vimLuaHeredoc contained 2434 \ matchgroup=vimScriptHeredocStart 2435 \ start=+<<\ze\s*$+ 2436 \ matchgroup=vimScriptHeredocStop 2437 \ end=+^\.$+ 2438 \ contains=@vimLuaScript 2439 VimFoldl syn region vimLuaHeredoc contained 2440 \ matchgroup=vimScriptHeredocStart 2441 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+ 2442 \ matchgroup=vimScriptHeredocStop 2443 \ end=+^\z1\=\z2$+ 2444 \ contains=@vimLuaScript 2445 VimFoldl syn region vimLuaHeredoc contained 2446 \ matchgroup=vimScriptHeredocStart 2447 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+ 2448 \ matchgroup=vimScriptHeredocStop 2449 \ end=+^\z1\=\.$+ 2450 \ contains=@vimLuaScript 2451 2452 " [-- mzscheme --] {{{3 2453 if s:interfaces =~# 'm' 2454 let s:iskKeep = &l:isk 2455 syn include @vimMzSchemeScript syntax/scheme.vim 2456 unlet b:current_syntax 2457 let &l:isk = s:iskKeep 2458 endif 2459 2460 syn keyword vimMzScheme contained mz[scheme] skipwhite nextgroup=vimMzSchemeHeredoc,vimMzSchemeStatement 2461 syn keyword vimMzScheme contained mzf[ile] 2462 syn match vimMzScheme_ contained "mz\%[scheme]\>" skipwhite nextgroup=vimMzSchemeHeredoc,vimMzSchemeStatement 2463 syn match vimMzScheme_ contained "mzf\%[ile]\>" 2464 2465 syn region vimMzSchemeStatement contained 2466 \ start="\S" 2467 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 2468 \ end="$" 2469 \ contains=@vimMzSchemeScript,@vimContinue 2470 VimFoldm syn region vimMzSchemeHeredoc contained 2471 \ matchgroup=vimScriptHeredocStart 2472 \ start=+<<\s*\z(\S\+\)\ze\s*$+ 2473 \ matchgroup=vimScriptHeredocStop 2474 \ end=+^\z1$+ 2475 \ contains=@vimMzSchemeScript 2476 VimFoldm syn region vimMzSchemeHeredoc contained 2477 \ matchgroup=vimScriptHeredocStart 2478 \ start=+<<\ze\s*$+ 2479 \ matchgroup=vimScriptHeredocStop 2480 \ end=+^\.$+ 2481 \ contains=@vimMzSchemeScript 2482 VimFoldm syn region vimMzSchemeHeredoc contained 2483 \ matchgroup=vimScriptHeredocStart 2484 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+ 2485 \ matchgroup=vimScriptHeredocStop 2486 \ end=+^\z1\=\z2$+ 2487 \ contains=@vimMzSchemeScript 2488 VimFoldm syn region vimMzSchemeHeredoc contained 2489 \ matchgroup=vimScriptHeredocStart 2490 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+ 2491 \ matchgroup=vimScriptHeredocStop 2492 \ end=+^\z1\=\.$+ 2493 \ contains=@vimMzSchemeScript 2494 2495 " [-- perl --] {{{3 2496 if s:interfaces =~# 'p' 2497 syn include @vimPerlScript syntax/perl.vim 2498 unlet b:current_syntax 2499 endif 2500 2501 syn keyword vimPerl contained pe[rl] skipwhite nextgroup=vimPerlHeredoc,vimPerlStatement 2502 syn keyword vimPerl contained perld[o] skipwhite nextgroup=vimPerlStatement 2503 syn match vimPerl_ contained "pe\%[rl]\>" skipwhite nextgroup=vimPerlHeredoc,vimPerlStatement 2504 syn match vimPerl_ contained "perld\%[o]\>" skipwhite nextgroup=vimPerlStatement 2505 2506 syn region vimPerlStatement contained 2507 \ start="\S" 2508 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 2509 \ end="$" 2510 \ contains=@vimPerlScript,@vimContinue 2511 VimFoldp syn region vimPerlHeredoc contained 2512 \ matchgroup=vimScriptHeredocStart 2513 \ start=+<<\s*\z(\S\+\)\ze\s*$+ 2514 \ matchgroup=vimScriptHeredocStop 2515 \ end=+^\z1$+ contains=@vimPerlScript 2516 VimFoldp syn region vimPerlHeredoc contained 2517 \ matchgroup=vimScriptHeredocStart 2518 \ start=+<<\ze\s*$+ matchgroup=vimScriptHeredocStop 2519 \ end=+^\.$+ 2520 \ contains=@vimPerlScript 2521 VimFoldp syn region vimPerlHeredoc contained 2522 \ matchgroup=vimScriptHeredocStart 2523 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+ 2524 \ matchgroup=vimScriptHeredocStop 2525 \ end=+^\z1\=\z2$+ 2526 \ contains=@vimPerlScript 2527 VimFoldp syn region vimPerlHeredoc contained 2528 \ matchgroup=vimScriptHeredocStart 2529 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+ 2530 \ matchgroup=vimScriptHeredocStop 2531 \ end=+^\z1\=\.$+ 2532 \ contains=@vimPerlScript 2533 2534 " [-- python --] {{{3 2535 if s:interfaces =~# 'P' 2536 syn include @vimPythonScript syntax/python2.vim 2537 unlet b:current_syntax 2538 endif 2539 2540 syn keyword vimPython contained py[thon] skipwhite nextgroup=vimPythonHeredoc,vimPythonStatement 2541 syn keyword vimPython contained pydo skipwhite nextgroup=vimPythonStatement 2542 syn keyword vimPython contained pyfile 2543 syn match vimPython__ contained "py\%[thon]\>" skipwhite nextgroup=vimPythonHeredoc,vimPythonStatement 2544 syn match vimPython__ contained "pydo\>" skipwhite nextgroup=vimPythonStatement 2545 syn match vimPython__ contained "pyfile\>" 2546 2547 syn region vimPythonStatement contained 2548 \ start="\S" 2549 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 2550 \ end="$" 2551 \ contains=@vimPythonScript,@vimContinue 2552 VimFoldP syn region vimPythonHeredoc contained 2553 \ matchgroup=vimScriptHeredocStart 2554 \ start=+<<\s*\z(\S\+\)\ze\s*$+ 2555 \ matchgroup=vimScriptHeredocStop 2556 \ end=+^\z1$+ 2557 \ contains=@vimPythonScript 2558 VimFoldP syn region vimPythonHeredoc contained 2559 \ matchgroup=vimScriptHeredocStart 2560 \ start=+<<\ze\s*$+ 2561 \ matchgroup=vimScriptHeredocStop 2562 \ end=+^\.$+ 2563 \ contains=@vimPythonScript 2564 VimFoldP syn region vimPythonHeredoc contained 2565 \ matchgroup=vimScriptHeredocStart 2566 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+ 2567 \ matchgroup=vimScriptHeredocStop 2568 \ end=+^\z1\=\z2$+ 2569 \ contains=@vimPythonScript 2570 VimFoldP syn region vimPythonHeredoc contained 2571 \ matchgroup=vimScriptHeredocStart 2572 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+ 2573 \ matchgroup=vimScriptHeredocStop 2574 \ end=+^\z1\=\.$+ 2575 \ contains=@vimPythonScript 2576 2577 " [-- python3 --] {{{3 2578 if s:interfaces =~# 'P' 2579 syn include @vimPython3Script syntax/python.vim 2580 unlet b:current_syntax 2581 endif 2582 2583 syn keyword vimPython3 contained python3 py3 skipwhite nextgroup=vimPython3Heredoc,vimPython3Statement 2584 syn keyword vimPython3 contained py3do skipwhite nextgroup=vimPython3Statement 2585 syn keyword vimPython3 contained py3file 2586 syn match vimPython3__ contained "python3\>" skipwhite nextgroup=vimPython3Heredoc,vimPython3Statement 2587 syn match vimPython3__ contained "py3\>" skipwhite nextgroup=vimPython3Heredoc,vimPython3Statement 2588 syn match vimPython3__ contained "py3do\>" skipwhite nextgroup=vimPython3Statement 2589 syn match vimPython3__ contained "py3file\>" 2590 2591 syn region vimPython3Statement contained 2592 \ start="\S" 2593 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 2594 \ end="$" 2595 \ contains=@vimPython3Script,@vimContinue 2596 VimFoldP syn region vimPython3Heredoc contained 2597 \ matchgroup=vimScriptHeredocStart 2598 \ start=+<<\s*\z(\S\+\)\ze\s*$+ 2599 \ matchgroup=vimScriptHeredocStop 2600 \ end=+^\z1$+ 2601 \ contains=@vimPython3Script 2602 VimFoldP syn region vimPython3Heredoc contained 2603 \ matchgroup=vimScriptHeredocStart 2604 \ start=+<<\ze\s*$+ 2605 \ matchgroup=vimScriptHeredocStop 2606 \ end=+^\.$+ 2607 \ contains=@vimPython3Script 2608 VimFoldP syn region vimPython3Heredoc contained 2609 \ matchgroup=vimScriptHeredocStart 2610 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+ 2611 \ matchgroup=vimScriptHeredocStop 2612 \ end=+^\z1\=\z2$+ 2613 \ contains=@vimPython3Script 2614 VimFoldP syn region vimPython3Heredoc contained 2615 \ matchgroup=vimScriptHeredocStart 2616 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+ 2617 \ matchgroup=vimScriptHeredocStop 2618 \ end=+^\z1\=\.$+ 2619 \ contains=@vimPython3Script 2620 2621 " [-- pythonx --] {{{3 2622 if s:interfaces =~# 'P' 2623 if &pyxversion == 2 2624 syn cluster vimPythonXScript contains=@vimPythonScript 2625 else 2626 syn cluster vimPythonXScript contains=@vimPython3Script 2627 endif 2628 endif 2629 2630 syn keyword vimPythonX contained pythonx pyx skipwhite nextgroup=vimPythonXHeredoc,vimPythonXStatement 2631 syn keyword vimPythonX contained pyxdo skipwhite nextgroup=vimPythonXStatement 2632 syn keyword vimPythonX contained pyxfile 2633 syn match vimPythonX__ contained "pythonx\>" skipwhite nextgroup=vimPythonXHeredoc,vimPythonXStatement 2634 syn match vimPythonX__ contained "pyx\>" skipwhite nextgroup=vimPythonXHeredoc,vimPythonXStatement 2635 syn match vimPythonX__ contained "pyxdo\>" skipwhite nextgroup=vimPythonXStatement 2636 syn match vimPythonX__ contained "pyxfile\>" 2637 2638 syn region vimPythonXStatement contained 2639 \ start="\S" 2640 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 2641 \ end="$" 2642 \ contains=@vimPythonXScript,@vimContinue 2643 VimFoldP syn region vimPythonXHeredoc contained 2644 \ matchgroup=vimScriptHeredocStart 2645 \ start=+<<\s*\z(\S\+\)\ze\s*$+ 2646 \ matchgroup=vimScriptHeredocStop 2647 \ end=+^\z1$+ 2648 \ contains=@vimPythonXScript 2649 VimFoldP syn region vimPythonXHeredoc contained 2650 \ matchgroup=vimScriptHeredocStart 2651 \ start=+<<\ze\s*$+ 2652 \ matchgroup=vimScriptHeredocStop 2653 \ end=+^\.$+ 2654 \ contains=@vimPythonXScript 2655 VimFoldP syn region vimPythonXHeredoc contained 2656 \ matchgroup=vimScriptHeredocStart 2657 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+ 2658 \ matchgroup=vimScriptHeredocStop 2659 \ end=+^\z1\=\z2$+ 2660 \ contains=@vimPythonXScript 2661 VimFoldP syn region vimPythonXHeredoc contained 2662 \ matchgroup=vimScriptHeredocStart 2663 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+ 2664 \ matchgroup=vimScriptHeredocStop 2665 \ end=+^\z1\=\.$+ 2666 \ contains=@vimPythonXScript 2667 2668 " [-- ruby --] {{{3 2669 if s:interfaces =~# 'r' 2670 syn include @vimRubyScript syntax/ruby.vim 2671 unlet b:current_syntax 2672 endif 2673 2674 syn keyword vimRuby contained rub[y] skipwhite nextgroup=vimRubyHeredoc,vimRubyStatement 2675 syn keyword vimRuby contained rubyd[o] skipwhite nextgroup=vimRubyStatement 2676 syn keyword vimRuby contained rubyf[ile] 2677 syn match vimRuby_ contained "rub[y]\=\>" skipwhite nextgroup=vimRubyHeredoc,vimRubyStatement 2678 syn match vimRuby_ contained "rubydo\=\>" skipwhite nextgroup=vimRubyStatement 2679 syn match vimRuby_ contained "rubyf\%[ile]\>" 2680 2681 syn region vimRubyStatement contained 2682 \ start="\S" 2683 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 2684 \ end="$" 2685 \ contains=@vimRubyScript,@vimContinue 2686 VimFoldr syn region vimRubyHeredoc contained 2687 \ matchgroup=vimScriptHeredocStart 2688 \ start=+<<\s*\z(\S\+\)\ze\s*$+ 2689 \ matchgroup=vimScriptHeredocStop 2690 \ end=+^\z1$+ 2691 \ contains=@vimRubyScript 2692 VimFoldr syn region vimRubyHeredoc contained 2693 \ matchgroup=vimScriptHeredocStart 2694 \ start=+<<\ze\s*$+ matchgroup=vimScriptHeredocStop 2695 \ end=+^\.$+ 2696 \ contains=@vimRubyScript 2697 VimFoldr syn region vimRubyHeredoc contained 2698 \ matchgroup=vimScriptHeredocStart 2699 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+ 2700 \ matchgroup=vimScriptHeredocStop 2701 \ end=+^\z1\=\z2$+ 2702 \ contains=@vimRubyScript 2703 VimFoldr syn region vimRubyHeredoc contained 2704 \ matchgroup=vimScriptHeredocStart 2705 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+ 2706 \ matchgroup=vimScriptHeredocStop 2707 \ end=+^\z1\.$+ 2708 \ contains=@vimRubyScript 2709 2710 " [-- tcl --] {{{3 2711 if s:interfaces =~# 't' 2712 syn include @vimTclScript syntax/tcl.vim 2713 unlet b:current_syntax 2714 endif 2715 2716 syn keyword vimTcl contained tcl skipwhite nextgroup=vimTclHeredoc,vimTclStatement 2717 syn keyword vimTcl contained tcld[o] skipwhite nextgroup=vimTclStatement 2718 syn keyword vimTcl contained tclf[ile] 2719 syn match vimTcl_ contained "tcl\>" skipwhite nextgroup=vimTclHeredoc,vimTclStatement 2720 syn match vimTcl_ contained "tcld\%[o]\>" skipwhite nextgroup=vimTclStatement 2721 syn match vimTcl_ contained "tclf\%[ile]\>" 2722 syn region vimTclStatement contained 2723 \ start="\S" 2724 \ skip=+\n\s*\%(\\\|["#]\\ \)+ 2725 \ end="$" 2726 \ contains=@vimTclScript,@vimContinue 2727 VimFoldt syn region vimTclHeredoc contained 2728 \ matchgroup=vimScriptHeredocStart 2729 \ start=+<<\s*\z(\S\+\)\ze\s*$+ 2730 \ matchgroup=vimScriptHeredocStop 2731 \ end=+^\z1$+ 2732 \ contains=@vimTclScript 2733 VimFoldt syn region vimTclHeredoc contained 2734 \ matchgroup=vimScriptHeredocStart 2735 \ start=+<<\ze\s*$+ 2736 \ matchgroup=vimScriptHeredocStop 2737 \ end=+^\.$+ 2738 \ contains=@vimTclScript 2739 VimFoldt syn region vimTclHeredoc contained 2740 \ matchgroup=vimScriptHeredocStart 2741 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\s\+\z(\S\+\)\ze\s*$+ 2742 \ matchgroup=vimScriptHeredocStop 2743 \ end=+^\z1\=\z2$+ 2744 \ contains=@vimTclScript 2745 VimFoldt syn region vimTclHeredoc contained 2746 \ matchgroup=vimScriptHeredocStart 2747 \ start=+\%(^\z(\s*\)\S.*\)\@<=<<\s*trim\ze\s*$+ 2748 \ matchgroup=vimScriptHeredocStop 2749 \ end=+^\z1\=\.$+ 2750 \ contains=@vimTclScript 2751 2752 unlet s:interfaces 2753 " Beginners - Patterns that involve ^ {{{2 2754 " ========= 2755 syn cluster vimCommand_ contains=vimCommand_,vim\u\w\+_ 2756 2757 VimExtend Vim9 syn region vim9LineComment contained start=+\%#=1#\%({\@!\|{{\).*$+ skip=+\n\s*\%(\\\|#\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString,vim9CommentTitle 2758 VimExtend VimL syn region vimLineComment contained start=+".*$+ skip=+\n\s*\%(\\\|"\\ \)+ end="$" contains=@vimCommentGroup,vimCommentString,vimCommentTitle 2759 2760 syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup 2761 syn match vim9CommentTitle '#\s*\%([sS]:\|\h\w*#\)\=\%([A-DF-Z]\w*\|E\%(\d\{1,4}\>\)\@!\w*\)\(\s\+\u\w*\)*:'hs=s+1 contained contains=vim9CommentTitleLeader,vimTodo,@vimCommentGroup 2762 2763 syn match vimContinue "^\s*\zs\\" contains=vimLeadingWhitespace "skipwhite nextgroup=vimCmdSep 2764 VimExtend syn match vimContinueComment '^\s*\zs["#]\\ .*' contains=vimLeadingWhitespace 2765 VimExtend syn match vim9ContinueComment "^\s*\zs#\\ .*" contains=vimLeadingWhitespace 2766 syn cluster vimContinue contains=vimContinue,vimContinueComment 2767 syn cluster vim9Continue contains=vimContinue,vim9ContinueComment 2768 2769 syn region vimString start='^\s*\\"' end='"' oneline keepend contains=@vimStringGroup,vimContinue 2770 syn region vimString start="^\s*\\'" end="'" oneline keepend contains=vimQuoteEscape,vimContinue 2771 2772 syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained 2773 syn match vim9CommentTitleLeader '#\s\+'ms=s+1 contained 2774 2775 " TODO: remove Vim9 prefix command, nextgroup after SOL etc. 2776 " : parameterize patterns with no nextgroup 2777 Vim9 syn match vim9LhsVariable contained transparent "\s\=\%([bwgstv]:\|&\%([lg]:\)\=\|\$\)\=\h[a-zA-Z0-9#_]*\ze\s\+[-+/*%]\==\%(\s\|$\)" contains=vimVar,vimVarScope,@vimSpecialVar,vimEnvvar 2778 Vim9 syn match vim9LhsVariable contained transparent "\s\=\%([bwgstv]:\|&\%([lg]:\)\=\|\$\)\=\h[a-zA-Z0-9#_]*\ze\s\+\.\.=\%(\s\|$\)" contains=vimVar,vimVarScope,@vimSpecialVar,vimEnvvar 2779 Vim9 syn match vim9LhsVariable contained transparent "\s\=\%([bwgstv]:\|&\%([lg]:\)\=\|\$\)\=\h[a-zA-Z0-9#_]*\ze\s\+=<<" skipwhite nextgroup=vimLetHeredoc contains=vimVar,vimVarScope,@vimSpecialVar,vimEnvvar 2780 Vim9 syn match vim9LhsVariable contained transparent "\s\=\%([bwgstv]:\|&\%([lg]:\)\=\|\$\)\=\h[a-zA-Z0-9#_]*\ze\s*->" contains=vimVar,vimVarScope,@vimSpecialVar,vimEnvvar,vim9Super,vim9This 2781 Vim9 syn match vim9LhsVariable contained transparent "\s\=\%([bwgstv]:\|&\%([lg]:\)\=\|\$\)\=\h[a-zA-Z0-9#_]*\ze\[" nextgroup=vimSubscriptBrackets contains=vimVar,vimVarScope,@vimSpecialVar,vimEnvvar 2782 " TODO: remove these in favour of funccall handling? 2783 Vim9 syn match vim9LhsVariable contained transparent "\s\=\%([bwgtv]:\|&\%([lg]:\)\=\|\$\)\=\h[a-zA-Z0-9#_]*\ze\." nextgroup=vimSubscriptDot contains=vimVar,vimVarScope,@vimSpecialVar,vimEnvvar,vim9Super,vim9This 2784 2785 Vim9 syn match vim9LhsVariableList contained "\[\_[^]]\+]\ze\s\+[-+/*%]\==" contains=vimVar,@vimSpecialVar 2786 Vim9 syn match vim9LhsVariableList contained "\[\_[^]]\+]\ze\s\+=<<" skipwhite nextgroup=vimLetHeredoc contains=vimVar,@vimSpecialVar 2787 Vim9 syn match vim9LhsVariableList contained "\[\_[^]]\+]\ze\s\+\.\.=" contains=vimVar,@vimSpecialVar 2788 2789 Vim9 syn match vim9LhsRegister contained "@["0-9\-a-zA-Z#=*+_/]\ze\s\+\%(\.\.\)\==" 2790 2791 syn cluster vim9Lhs contains=vim9Lhs.* 2792 2793 " TODO: Useless expressions like "string" at SOL? 2794 " : Continue shouldn't be included here. 2795 VimL syn match vimLineStart "^" skipwhite nextgroup=vimCmdStart,@vimRange,@vimCmdList,@vimContinue,vimComment,vimLineComment 2796 " FIXME: continued expressions 2797 Vim9 syn match vim9LineStart "^" skipwhite nextgroup=vimCmdStart,@vimCmdList,@vim9Continue,vimCmdSep,vim9Comment,vim9LineComment,vim9Block,vim9Lhs.*,@vim9Func ,vimOperParen,vimOper,vim9Boolean,vim9Null,vimNumber,vimString 2798 2799 syn match vimCmdSep "\\\@1<!|\%(\%(\s*\n\s*["#]\\ .*\)*\s*\n\s*\\\)\=" skipwhite nextgroup=vimCmdStart,@vimRange,@vimCmdList,@vimFunc,@vim9Func,vim9Block,vim9Lhs.* contains=@vimCmdSepContinue 2800 syn match vimCmdSep contained "|\%(\%(\s*\n\s*["#]\\ .*\)*\s*\n\s*\\\)\=" skipwhite nextgroup=vimCmdStart,@vimRange,@vimCmdList,@vimFunc,@vim9Func,vim9Block,vim9Lhs.* contains=@vimCmdSepContinue 2801 2802 syn match vimCmdSepContinue contained "^\s*\\" skipwhite skipnl nextgroup=@vimCmdSepContinue,vimCmdStart,@vimRange,@vimCmdList contains=vimLeadingWhitespace 2803 syn match vimCmdSepContinueComment contained '^\s*["#]\\ .*' skipwhite skipnl nextgroup=@vimCmdSepContinue contains=vimLeadingWhitespace 2804 syn cluster vimCmdSepContinue contains=vimCmdSepContinue,vimCmdSepContinueComment 2805 2806 " TODO: fix priority, not trailing bar 2807 syn match vimOper "||" skipwhite skipnl nextgroup=@vimOperContinue,@vimExprList,vimSpecFile 2808 2809 " prevent variable statements at the start of a line matching as a :command 2810 " NOTE: needs to consume leading whitespace, to prevent skip* matching it 2811 " TODO: extend to foo.bar.baz += 99 qualified names? Slower but more generalized 2812 Vim9 syn match vim9LhsVariable_ "^\s*\h\w*\ze[[.]" nextgroup=vimSubscriptBrackets,vimSubscriptDot contains=vimVar,vim9Super,vim9This,vimWhitespace 2813 Vim9 syn match vim9LhsVariable_ "^\s*\h\w*\ze\s\+\%([-+/*%]\==\|\.\.=\)\%(\s\|$\)" contains=vimVar,vim9Super,vim9This,vimWhitespace 2814 Vim9 syn match vim9LhsVariable_ "^\s*\h\w*\ze\s*\->" contains=vimVar,vim9Super,vim9This,vimWhitespace 2815 Vim9 syn match vim9LhsVariable_ "^\s*\h\w*\ze\s\+=<<" skipwhite nextgroup=vimLetHeredoc contains=vimVar,vim9Super,vim9This,vimWhitespace 2816 " rename vim9LhsFunctionCall? 2817 Vim9 syn match vim9UserFunc "^\s*\%([sgbwtv]:\|<[sS][iI][dD]>\)\=\h\w*\ze[(<]" skipwhite nextgroup=vimOperParen,vim9TypeArgs contains=vimVarScope,vimNotation,vim9MethodName,vim9Super,vim9This,vimWhitespace 2818 Vim9 syn match vim9UserFunc "^\s*\%(g:\)\=\%(\h\w*#\)\+\h\w*\ze[(<]" skipwhite nextgroup=vimOperParen contains=vimVarScope,vimWhitespace 2819 Vim9 syn match vim9Func "^\s*\l\w*\ze(" skipwhite nextgroup=vimOperParen contains=vimFuncName,vimWhitespace 2820 2821 Vim9 syn match vim9Wincmd contained "\s\=\<winc\%[md]\>\ze\s\+=\s*\%([#|]\|$\)" skipwhite nextgroup=vimWincmdArg contains=vimWhitespace 2822 Vim9 syn match vim9Wincmd "^\s*\<winc\%[md]\>\ze\s\+=\s*\%([#|]\|$\)" skipwhite nextgroup=vimWincmdArg contains=vimWhitespace 2823 2824 " allowed anywhere in the file 2825 if !s:vim9script 2826 syn match vimShebangError "^\s*\zs#!.*" display 2827 endif 2828 syn match vimShebang "\%^#!.*" display 2829 2830 2831 " Function Call Highlighting: {{{2 2832 " (following Gautam Iyer's suggestion) 2833 " ========================== 2834 syn match vimFunc contained "\<\l\w*\ze\s*(" skipwhite nextgroup=vimOperParen contains=vimFuncName 2835 " dict-key only 2836 syn match vimUserFuncKey contained "\%(\l\|\d\)\w*\ze\%(\s*(\|<.*>(\)" skipwhite nextgroup=vimOperParen,vim9TypeArgs contains=vim9MethodName 2837 syn match vimUserFunc contained "\<[[:upper:]_]\w*\ze\%(\s*(\|<.*>(\)" skipwhite nextgroup=vimOperParen,vim9TypeArgs contains=vim9MethodName,vim9Super,vim9This 2838 syn match vimUserFunc contained "\<\%(g:\)\=\%(\h\w*#\)\+\h\w*\ze\%(\s*(\|<.*>(\)" skipwhite nextgroup=vimOperParen contains=vimVarScope 2839 syn match vimUserFunc contained "\%(\<[sgbwtlav]:\|<[sS][iI][dD]>\)\h\w*\ze\%(\s*(\|<.*>(\)" skipwhite nextgroup=vimOperParen,vim9TypeArgs contains=vimVarScope,vimNotation 2840 2841 Vim9 syn match vim9UserFunc contained "\s\=\%([sgbwtv]:\|<[sS][iI][dD]>\)\=\h\w*\ze[(<]" skipwhite nextgroup=vimOperParen,vim9TypeArgs contains=vimVarScope,vimNotation,vim9MethodName,vim9Super,vim9This,vimWhitespace 2842 Vim9 syn match vim9UserFunc contained "\s\=\%(g:\)\=\%(\h\w*#\)\+\h\w*\ze[(<]" skipwhite nextgroup=vimOperParen contains=vimVarScope,vimWhitespace 2843 Vim9 syn match vim9Func contained "\l\w*\ze(" skipwhite nextgroup=vimOperParen contains=vimFuncName 2844 " higher priority for matches in command position 2845 Vim9 syn match vim9FuncWrap contained "\s\+\l\w*\ze(" contains=vim9Func transparent 2846 2847 syn cluster vimFunc contains=vimFunc,vimUserFunc 2848 syn cluster vim9Func contains=vim9FuncWrap,vim9UserFunc 2849 2850 syn region vim9TypeArgs contained 2851 \ matchgroup=Delimiter 2852 \ start="<\ze\a" 2853 \ end=">" 2854 \ nextgroup=vimOperParen 2855 \ contains=@vimType 2856 \ oneline 2857 2858 " Vim9 script Regions: {{{2 2859 " ================== 2860 2861 if s:vim9script 2862 syn cluster vimLegacyTop contains=TOP,vim9LegacyHeader,vim9LineStart,vim9Comment 2863 VimFoldH syn region vim9LegacyHeader start="\%^" end="^\ze\s*vim9s\%[cript]\>" contains=@vimLegacyTop,vimLineStart,vimComment 2864 2865 syn keyword vim9Vim9ScriptArg noclear contained 2866 syn keyword vim9Vim9Script vim9s[cript] nextgroup=vim9Vim9ScriptArg skipwhite 2867 endif 2868 2869 " Command-line Window Lines: {{{2 2870 " ========================= 2871 2872 if s:cmdline_window 2873 syn region vimCommandLineWindowLine 2874 \ start="^" 2875 \ end="$" 2876 \ contains=TOP,vimCommandLineWindowLine 2877 \ oneline 2878 \ keepend 2879 endif 2880 2881 " Synchronize (speed) {{{2 2882 "============ 2883 2884 exe "syn sync minlines=" .. get(g:, "vimsyn_minlines", 100) 2885 exe "syn sync maxlines=" .. get(g:, "vimsyn_maxlines", 200) 2886 2887 syn sync linecont "^\s\+\\" 2888 syn sync linebreaks=2 2889 syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]" 2890 2891 " ==================== 2892 " Highlighting Settings {{{2 2893 " ==================== 2894 2895 if !exists("skip_vim_syntax_inits") 2896 if !exists("g:vimsyn_noerror") 2897 hi def link vimBehaveError vimError 2898 hi def link vimCollClassErr vimError 2899 hi def link vimErrSetting vimError 2900 hi def link vimFTError vimError 2901 hi def link vimFunctionError vimError 2902 hi def link vimFunc vimError 2903 hi def link vim9Func vimError 2904 hi def link vimHiAttribList vimError 2905 hi def link vimHiCtermError vimError 2906 hi def link vimHiKeyError vimError 2907 hi def link vimMapModErr vimError 2908 hi def link vimMarkArgError vimError 2909 hi def link vimShebangError vimError 2910 hi def link vimSortOptionsError Error 2911 hi def link vimSubstFlagErr vimError 2912 hi def link vimSynCaseError vimError 2913 hi def link vimSyncError vimError 2914 hi def link vimSynConcealError vimError 2915 hi def link vimSynError vimError 2916 hi def link vimSynKeyError vimError 2917 hi def link vimSynFoldlevelError vimError 2918 hi def link vimSynIskeywordError vimError 2919 hi def link vimSynSpellError vimError 2920 hi def link vimBufnrWarn vimWarn 2921 2922 hi def link vim9TypeAliasError vimError 2923 endif 2924 2925 hi def link vimAbb vimCommand 2926 hi def link vimAddress Constant 2927 hi def link vimAddressPattern Regexp 2928 hi def link vimAddressOffset Type 2929 hi def link vimAddressSlashEscape Special 2930 hi def link vimAddressQuestionEscape Special 2931 hi def link vimAt vimCommand 2932 hi def link vimAtArg Special 2933 hi def link vimAugroupBang vimBang 2934 hi def link vimAugroupError vimError 2935 hi def link vimAugroupKey vimCommand 2936 hi def link vimAutocmd vimCommand 2937 hi def link vimAutocmdBang vimBang 2938 hi def link vimAutocmdContinue vimContinue 2939 hi def link vimAutocmdContinueComment vimContinueComment 2940 hi def link vimAutocmdPatternEscape Special 2941 hi def link vimAutoEvent Type 2942 hi def link vimAutoEventGlob Type 2943 hi def link vimAutocmdBufferPattern Special 2944 hi def link vimAutocmdMod Special 2945 hi def link vimAutocmdPatternSep vimSep 2946 hi def link vimBang vimOper 2947 hi def link vimBehaveBang vimBang 2948 hi def link vimBehaveModel vimBehave 2949 hi def link vimBehave vimCommand 2950 hi def link vimBracket Delimiter 2951 hi def link vimBreakaddFunc Special 2952 hi def link vimBreakaddFile Special 2953 hi def link vimBreakaddHere Special 2954 hi def link vimBreakaddExpr Special 2955 hi def link vimBreakpointGlob Special 2956 hi def link vimBreakadd vimCommand 2957 hi def link vimBreakdel vimCommand 2958 hi def link vimBreaklist vimCommand 2959 hi def link vimBuffer vimCommand 2960 hi def link vimBuffer_ vimBuffer 2961 hi def link vimCall vimCommand 2962 hi def link vimCall_ vimCall 2963 hi def link vimCatch vimCommand 2964 hi def link vimCatchPattern Regexp 2965 hi def link vimChangeBang vimBang 2966 hi def link vimChangeCount vimCount 2967 hi def link vimCd vimCommand 2968 hi def link vimCdBang vimBang 2969 hi def link vimCmdSepContinue vimContinue 2970 hi def link vimCmdSepContinueComment vimContinueComment 2971 hi def link vimCommand Statement 2972 hi def link vimCommand_ vimCommand 2973 hi def link vimCommandModifier vimCommand 2974 hi def link vimCommandModifier_ vimCommandModifier 2975 hi def link vimCommandModifierBang vimBang 2976 hi def link vimCommandModifierContinue vimContinue 2977 hi def link vimCommandModifierContinueComment vimContinueComment 2978 hi def link vimComment Comment 2979 hi def link vimCommentError vimError 2980 hi def link vimCommentString vimString 2981 hi def link vimCommentTitle PreProc 2982 hi def link vimCondHL vimCommand 2983 hi def link vimConst vimCommand 2984 hi def link vimContinue Special 2985 hi def link vimContinueComment vimComment 2986 hi def link vimContinueString vimString 2987 hi def link vimCopy vimCommand 2988 hi def link vimCopy_ vimCopy 2989 hi def link vimCount Number 2990 hi def link vimCtrlChar SpecialChar 2991 hi def link vimDebug vimCommand 2992 hi def link vimDebuggreedy vimCommand 2993 hi def link vimDebuggreedy_ vimDebuggreedy 2994 hi def link vimDef vimCommand 2995 hi def link vimDefBang vimBang 2996 hi def link vimDefComment vim9Comment 2997 hi def link vimDefer vimCommand 2998 hi def link vimDefParam vimVar 2999 hi def link vimDelcommand vimCommand 3000 hi def link vimDelcommandAttr vimUserCmdAttr 3001 hi def link vimDelete vimCommand 3002 hi def link vimDelete_ vimDelete 3003 hi def link vimDeleteCount Number 3004 hi def link vimDeleteRegister Constant 3005 hi def link vimDelfunction vimCommand 3006 hi def link vimDelfunctionBang vimBang 3007 hi def link vimDoautocmd vimCommand 3008 hi def link vimDoautocmdMod Special 3009 hi def link vimDoCommand vimCommand 3010 hi def link vimDoCommand_ vimDoCommand 3011 hi def link vimDoCommandBang vimBang 3012 hi def link vimTextInputBang vimBang 3013 hi def link vimTextInputComment vimComment 3014 hi def link vimTextInputEnd vimCommand 3015 hi def link vimTextInputText String 3016 hi def link vimEcho vimCommand 3017 hi def link vimEchohlNone vimGroup 3018 hi def link vimEchohl vimCommand 3019 hi def link vimElse vimCommand 3020 hi def link vimElseif vimCommand 3021 hi def link vimElseIfErr Error 3022 hi def link vimEndfunction vimCommand 3023 hi def link vimEnddef vimCommand 3024 hi def link vimEndif vimCommand 3025 hi def link vimEnvvar PreProc 3026 hi def link vimError Error 3027 hi def link vimEscape Special 3028 hi def link vimEquals vimCommand 3029 hi def link vimEval vimCommand 3030 hi def link vimExFilter vimCommand 3031 hi def link vimExFilterBang vimBang 3032 hi def link vimExFilterPattern Regexp 3033 hi def link vimFBVar vimVar 3034 hi def link vimFgBgAttrib vimHiAttrib 3035 hi def link vimFuncEcho vimCommand 3036 hi def link vimFor vimCommand 3037 hi def link vimForInContinue vimContinue 3038 hi def link vimForInContinueComment vimContinueComment 3039 hi def link vimFTCmd vimCommand 3040 hi def link vimFTOption vimSynType 3041 hi def link vimFunction vimCommand 3042 hi def link vimFunctionBang vimBang 3043 hi def link vimFunctionComment vimComment 3044 hi def link vimFuncName Function 3045 hi def link vimFunctionMod Special 3046 hi def link vimFunctionPattern Regexp 3047 hi def link vimFunctionParam vimVar 3048 hi def link vimFunctionParamEquals vimOper 3049 hi def link vimFunctionScope vimVarScope 3050 hi def link vimFunctionSID vimNotation 3051 hi def link vimGlobal vimCommand 3052 hi def link vimGlobalPattern Regexp 3053 hi def link vimGrep vimCommand 3054 hi def link vimGrep_ vimGrep 3055 hi def link vimGrepadd vimCommand 3056 hi def link vimGrepadd_ vimGrepadd 3057 hi def link vimGrepBang vimBang 3058 hi def link vimGroup Type 3059 hi def link vimGroupAdd vimSynOption 3060 hi def link vimGroupListEquals vimSynOption 3061 hi def link vimGroupListContinue vimContinue 3062 hi def link vimGroupListContinueComment vimContinueComment 3063 hi def link vimGroupName Normal 3064 hi def link vimGroupRem vimSynOption 3065 hi def link vimGroupSpecial Special 3066 hi def link vimHelp vimCommand 3067 hi def link vimHelpBang vimBang 3068 hi def link vimHelpgrep vimCommand 3069 hi def link vimHelpgrepPattern Regexp 3070 hi def link vimHiAttrib PreProc 3071 hi def link vimHiBang vimBang 3072 hi def link vimHiClear Type 3073 hi def link vimHiCtermColor Constant 3074 hi def link vimHiCtermFgBg vimHiTerm 3075 hi def link vimHiCtermfont vimHiTerm 3076 hi def link vimHiCtermul vimHiTerm 3077 hi def link vimHiCTerm vimHiTerm 3078 hi def link vimHighlight vimCommand 3079 hi def link vimHiGroup vimGroupName 3080 hi def link vimHiGuiFgBg vimHiTerm 3081 hi def link vimHiGuiFont vimHiTerm 3082 hi def link vimHiGuiRgb vimNumber 3083 hi def link vimHiGui vimHiTerm 3084 hi def link vimHiNmbr Number 3085 hi def link vimHiNone vimGroup 3086 hi def link vimHiStartStop vimHiTerm 3087 hi def link vimHiTerm Type 3088 hi def link vimHLGroup vimGroup 3089 hi def link vimHistory vimCommand 3090 hi def link vimHistoryName Special 3091 hi def link vimIf vimCommand 3092 hi def link vimImport vimCommand 3093 hi def link vimImportAutoload Special 3094 hi def link vimImportAs vimImport 3095 hi def link vim9KeymapLineComment vimKeymapLineComment 3096 hi def link vimKeymapLineComment vimComment 3097 hi def link vimKeymapTailComment vimComment 3098 hi def link vimLambdaBrace Delimiter 3099 hi def link vimLambdaOperator vimOper 3100 hi def link vimLanguage vimCommand 3101 hi def link vimLanguageCategory Special 3102 hi def link vimLanguageNameReserved Constant 3103 hi def link vimLet vimCommand 3104 hi def link vimLetHeredoc vimString 3105 hi def link vimLetHeredocStart Special 3106 hi def link vimLetHeredocStop Special 3107 hi def link vimLetRegister vimRegister 3108 hi def link vimLetVar vimVar 3109 hi def link vimLineComment vimComment 3110 hi def link vimLoadkeymap vimCommand 3111 hi def link vimLockvar vimCommand 3112 hi def link vimLockvarBang vimBang 3113 hi def link vimLockvarDepth vimNumber 3114 hi def link vimLua vimCommand 3115 hi def link vimLua_ vimLua 3116 hi def link vimMake vimCommand 3117 hi def link vimMakeadd vimCommand 3118 hi def link vimMakeBang vimBang 3119 hi def link vimMapBang vimBang 3120 hi def link vimMapLeader vimBracket 3121 hi def link vimMapLeaderKey vimNotation 3122 hi def link vimMapModKey vimFunctionSID 3123 hi def link vimMapMod vimBracket 3124 hi def link vimMap vimCommand 3125 hi def link vimMark vimCommand 3126 hi def link vimMark_ vimMark 3127 hi def link vimMatch vimCommand 3128 hi def link vimMatch_ vimMatch 3129 hi def link vimMatchGroup vimGroup 3130 hi def link vimMatchNone vimGroup 3131 hi def link vimMatchPattern Regexp 3132 hi def link vimMenuBang vimBang 3133 hi def link vimMenuClear Special 3134 hi def link vimMenuMod vimMapMod 3135 hi def link vimMenuName PreProc 3136 hi def link vimMenu vimCommand 3137 hi def link vimMenu_ vimMenu 3138 hi def link vimMenuNotation vimNotation 3139 hi def link vimMenuPriority Number 3140 hi def link vimMenuStatus Special 3141 hi def link vimMenutranslateComment vimComment 3142 hi def link vim9MethodName vimFuncName 3143 hi def link vimMtchComment vimComment 3144 hi def link vimMzScheme vimCommand 3145 hi def link vimMzScheme_ vimMzScheme 3146 hi def link vimNonText NonText 3147 hi def link vimNormal vimCommand 3148 hi def link vimNotation Special 3149 hi def link vimNotPatSep Regexp 3150 hi def link vimNumber Number 3151 hi def link vimOperError Error 3152 hi def link vimOper Operator 3153 hi def link vimOperContinue vimContinue 3154 hi def link vimOperContinueComment vimContinueComment 3155 hi def link vimOption PreProc 3156 hi def link vimOptionVar Identifier 3157 hi def link vimOptionVarName Identifier 3158 hi def link vimPackadd vimCommand 3159 hi def link vimPackaddBang vimBang 3160 hi def link vimParenSep Delimiter 3161 hi def link vimPatSepErr vimError 3162 hi def link vimPatSepR vimPatSep 3163 hi def link vimPatSep SpecialChar 3164 hi def link vimPatSepZone Regexp 3165 hi def link vimPatSepZ vimPatSep 3166 hi def link vimPattern Type 3167 hi def link vimPerl vimCommand 3168 hi def link vimPerl_ vimPerl 3169 hi def link vimPound vimCommand 3170 hi def link vimPound_ vimPound 3171 hi def link vimPoundCount Number 3172 hi def link vimPrintFlag Special 3173 hi def link vimProfile vimCommand 3174 hi def link vimProfileArg vimSpecial 3175 hi def link vimProfileBang vimBang 3176 hi def link vimProfdel vimCommand 3177 hi def link vimProfdelArg vimSpecial 3178 hi def link vimPrompt vimCommand 3179 hi def link vimPython vimCommand 3180 hi def link vimPython3 vimCommand 3181 hi def link vimPythonX vimCommand 3182 hi def link vimPython__ vimPython 3183 hi def link vimPython3__ vimPython3 3184 hi def link vimPythonX__ vimPythonX 3185 hi def link vimQuoteEscape vimEscape 3186 hi def link vimRange Constant 3187 hi def link vimRedir vimCommand 3188 hi def link vimRedirBang vimBang 3189 hi def link vimRedirFileOperator vimOper 3190 hi def link vimRedirRegisterOperator vimOper 3191 hi def link vimRedirVariableOperator vimOper 3192 hi def link vimRedirEnd Special 3193 hi def link vimRedirRegister vimRegister 3194 hi def link vimRegister SpecialChar 3195 hi def link vimReturn vimCommand 3196 hi def link vimRuby vimCommand 3197 hi def link vimRuby_ vimRuby 3198 hi def link vimRuntime vimCommand 3199 hi def link vimRuntimeBang vimBang 3200 hi def link vimRuntimeWhere Special 3201 hi def link vimScriptDelim Comment 3202 hi def link vimScriptHeredocStart vimLetHeredocStart 3203 hi def link vimScriptHeredocStop vimLetHeredocStop 3204 hi def link vimSep Delimiter 3205 hi def link vimSet vimCommand 3206 hi def link vimSetAll vimOption 3207 hi def link vimSetBang vimBang 3208 hi def link vimSetComment vimComment 3209 hi def link vimSetMod vimOption 3210 hi def link vimSetSep vimSep 3211 hi def link vimSetTermcap vimOption 3212 hi def link vimShebang PreProc 3213 hi def link vimShiftLeftCount Number 3214 hi def link vimShiftLeftPlus Special 3215 hi def link vimShiftLeft vimCommand 3216 hi def link vimShiftRightCount Number 3217 hi def link vimShiftRightPlus Special 3218 hi def link vimShiftRight vimCommand 3219 hi def link vimSleep vimCommand 3220 hi def link vimSleep_ vimSleep 3221 hi def link vimSleepArg Constant 3222 hi def link vimSleepBang vimBang 3223 hi def link vimSort vimCommand 3224 hi def link vimSort_ vimSort 3225 hi def link vimSortBang vimBang 3226 hi def link vimSortOptions Special 3227 hi def link vimSortPattern Regexp 3228 hi def link vimSpecFile Identifier 3229 hi def link vimSpecFileMod vimSpecFile 3230 hi def link vimSpecial Type 3231 hi def link vimStringCont vimString 3232 hi def link vimString String 3233 hi def link vimStringEnd vimString 3234 hi def link vimStringInterpolationBrace vimEscape 3235 hi def link vimSubstCount Number 3236 hi def link vimSubstDelim Delimiter 3237 hi def link vimSubstFlags Special 3238 hi def link vimSubstPat Regexp 3239 hi def link vimSubstSubstr SpecialChar 3240 hi def link vimSubstTwoBS Regexp 3241 hi def link vimSubst vimCommand 3242 hi def link vimSubst_ vimSubst 3243 hi def link vimSynCase Type 3244 hi def link vimSyncCcomment Type 3245 hi def link vimSynCchar vimSynOption 3246 hi def link vimSynCcharValue Character 3247 hi def link vimSyncClear Type 3248 hi def link vimSyncFromstart Type 3249 hi def link vimSyncGroup vimGroupName 3250 hi def link vimSyncGroupName vimGroupName 3251 hi def link vimSyncKey Type 3252 hi def link vimSyncLinebreak Type 3253 hi def link vimSyncLinecont Type 3254 hi def link vimSyncLines Type 3255 hi def link vimSyncMatch Type 3256 hi def link vimSyncNone Type 3257 hi def link vimSynConceal Type 3258 hi def link vimSynContains vimSynOption 3259 hi def link vimSyncRegion Type 3260 hi def link vimSynFoldlevel Type 3261 hi def link vimSynIskeyword Type 3262 hi def link vimSynIskeywordSep Delimiter 3263 hi def link vimSynContainedin vimSynContains 3264 hi def link vimSynKeyOpt vimSynOption 3265 hi def link vimSynMtchGrp vimSynOption 3266 hi def link vimSynMtchOpt vimSynOption 3267 hi def link vimSynNextgroup vimSynOption 3268 hi def link vimSynNotPatRange vimSynRegPat 3269 hi def link vimSynOption Special 3270 hi def link vimSynPatRange Regexp 3271 hi def link vimSynReg Type 3272 hi def link vimSynRegOpt vimSynOption 3273 hi def link vimSynRegPat Regexp 3274 hi def link vimSynSpell Type 3275 hi def link vimSyntax vimCommand 3276 hi def link vimSynType vimSpecial 3277 hi def link vimSyntime vimCommand 3278 hi def link vimSyntimeArg vimSpecial 3279 hi def link vimTcl vimCommand 3280 hi def link vimTcl_ vimTcl 3281 hi def link vimTerminal vimCommand 3282 hi def link vimTerminal_ vimCommand 3283 hi def link vimTerminalContinue vimContinue 3284 hi def link vimTerminalContinueComment vimContinueComment 3285 hi def link vimTerminalOption vimSpecial 3286 hi def link vimTerminalKillOptionArg Constant 3287 hi def link vimTerminalSizeOptionArg Constant 3288 hi def link vimTerminalTypeOptionArg Constant 3289 hi def link vimThrow vimCommand 3290 hi def link vimTodo Todo 3291 hi def link vimType Type 3292 hi def link vimTypeAny vimType 3293 hi def link vimTypeObject vimType 3294 hi def link vimTypeObjectBracket vimTypeObject 3295 hi def link vimUniq vimCommand 3296 hi def link vimUniq_ vimUniq 3297 hi def link vimUniqBang vimBang 3298 hi def link vimUniqOptions Special 3299 hi def link vimUniqPattern Regexp 3300 hi def link vimUnlet vimCommand 3301 hi def link vimUnletBang vimBang 3302 hi def link vimUnlockvar vimCommand 3303 hi def link vimUnmap vimMap 3304 hi def link vimUserCmd vimCommand 3305 hi def link vimUserCmdAttrAddr vimSpecial 3306 hi def link vimUserCmdAttrComplete vimSpecial 3307 hi def link vimUserCmdAttrCompleteFunc vimVar 3308 hi def link vimUserCmdAttrNargs vimSpecial 3309 hi def link vimUserCmdAttrRange vimSpecial 3310 hi def link vimUserCmdAttrKey vimUserCmdAttr 3311 hi def link vimUserCmdAttr Special 3312 hi def link vimUserCmdAttrError Error 3313 hi def link vimUserCmdError Error 3314 hi def link vimUserCmdKey vimCommand 3315 hi def link vimUserFunc Normal 3316 hi def link vimUserFuncKey vimUserFunc 3317 hi def link vimUsrCmdBang vimBang 3318 hi def link vimVar Normal 3319 hi def link vimVarKey vimVar 3320 hi def link vimVarScope Identifier 3321 hi def link vimVimgrep vimCommand 3322 hi def link vimVimgrep_ vimVimgrep 3323 hi def link vimVimgrepadd vimCommand 3324 hi def link vimVimgrepadd_ vimVimgrepadd 3325 hi def link vimVimgrepBang vimBang 3326 hi def link vimVimgrepFlags Special 3327 hi def link vimVimgrepPattern Regexp 3328 hi def link vimVimVar Identifier 3329 hi def link vimVimVarName Identifier 3330 hi def link vimWarn WarningMsg 3331 hi def link vimWhile vimCommand 3332 hi def link vimWildcard Special 3333 hi def link vimWildcardBraceComma vimWildcard 3334 hi def link vimWildcardBracket vimWildcard 3335 hi def link vimWildcardBracketCaret vimWildcard 3336 hi def link vimWildcardBracketCharacter Normal 3337 hi def link vimWildcardBracketCharacter Normal 3338 hi def link vimWildcardBracketCharacterClass vimWildcard 3339 hi def link vimWildcardBracketCollatingSymbol vimWildcard 3340 hi def link vimWildcardBracketEnd vimWildcard 3341 hi def link vimWildcardBracketEquivalenceClass vimWildcard 3342 hi def link vimWildcardBracketEscape vimWildcard 3343 hi def link vimWildcardBracketHyphen vimWildcard 3344 hi def link vimWildcardBracketRightBracket vimWildcardBracketCharacter 3345 hi def link vimWildcardBracketStart vimWildcard 3346 hi def link vimWildcardEscape vimWildcard 3347 hi def link vimWildcardInterval vimWildcard 3348 hi def link vimWildcardQuestion vimWildcard 3349 hi def link vimWildcardStar vimWildcard 3350 hi def link vimWinCmd vimCommand 3351 hi def link vimWrite vimCommand 3352 hi def link vimWrite_ vimWrite 3353 3354 hi def link vim9Abstract vimCommand 3355 hi def link vim9Boolean Boolean 3356 hi def link vim9Class vimCommand 3357 hi def link vim9Comment Comment 3358 hi def link vim9CommentError vimError 3359 hi def link vim9CommentTitle PreProc 3360 hi def link vim9ConstructorDefParam vimVar 3361 hi def link vim9Const vimCommand 3362 hi def link vim9ContinueComment vimContinueComment 3363 hi def link vim9Enum vimCommand 3364 hi def link vim9EnumImplementedInterfaceComment vim9Comment 3365 hi def link vim9EnumImplements vim9Implements 3366 hi def link vim9EnumNameComment vim9Comment 3367 hi def link vim9EnumNameContinue vimContinue 3368 hi def link vim9EnumNameContinueComment vim9Comment 3369 hi def link vim9EnumValueListCommaComment vim9Comment 3370 hi def link vim9Export vimCommand 3371 hi def link vim9Extends Keyword 3372 hi def link vim9Final vimCommand 3373 hi def link vim9For vimCommand 3374 hi def link vim9ForInComment vim9Comment 3375 hi def link vim9Implements Keyword 3376 hi def link vim9AbstractDef vimCommand 3377 hi def link vim9Interface vimCommand 3378 hi def link vim9LambdaOperator vimOper 3379 hi def link vim9LambdaOperatorComment vim9Comment 3380 hi def link vim9LambdaParen vimParenSep 3381 hi def link vim9LhsRegister vimLetRegister 3382 hi def link vim9LhsVariable vimVar 3383 hi def link vim9LineComment vimComment 3384 hi def link vim9MethodDef vimCommand 3385 hi def link vim9MethodDefComment vimDefComment 3386 hi def link vim9MethodNameError vimFunctionError 3387 hi def link vim9Null Constant 3388 hi def link vim9Public vimCommand 3389 hi def link vim9Static vimCommand 3390 hi def link vim9Super Identifier 3391 hi def link vim9This Identifier 3392 hi def link vim9Type vimCommand 3393 hi def link vim9TypeEquals vimOper 3394 hi def link vim9Variable vimVar 3395 hi def link vim9VariableType vimType 3396 hi def link vim9VariableTypeAny vimTypeAny 3397 hi def link vim9VariableTypeObject vimTypeObject 3398 hi def link vim9VariableTypeObjectBracket vimTypeObjectBracket 3399 hi def link vim9Var vimCommand 3400 hi def link vim9Vim9ScriptArg Special 3401 hi def link vim9Vim9Script vimCommand 3402 hi def link vim9Wincmd vimWincmd 3403 hi def link vimWincmd_ vimWincmd 3404 3405 hi def link vimCompilerSet vimCommand 3406 hi def link vimVimExtend vimCommand 3407 hi def link vimSynColor vimCommand 3408 hi def link vimSynLink vimCommand 3409 hi def link vimSynMenu vimCommand 3410 hi def link vimSynMenuPath vimMenuName 3411 hi def link vimVimFold vimCommand 3412 hi def link vimVim9 vimCommand 3413 hi def link vimVimL vimCommand 3414 3415 endif 3416 3417 " Current Syntax Variable: {{{2 3418 let b:current_syntax = "vim" 3419 3420 " --------------------------------------------------------------------- 3421 " Cleanup: {{{1 3422 delc Vim9 3423 delc VimL 3424 delc VimExtend 3425 delc VimFolda 3426 delc VimFoldc 3427 delc VimFolde 3428 delc VimFoldf 3429 delc VimFoldh 3430 delc VimFoldH 3431 delc VimFoldi 3432 delc VimFoldl 3433 delc VimFoldm 3434 delc VimFoldp 3435 delc VimFoldP 3436 delc VimFoldr 3437 delc VimFoldt 3438 let &cpo = s:keepcpo 3439 unlet s:keepcpo s:vim9script 3440 " vim:ts=18 fdm=marker ft=vim