comparison runtime/syntax/vim.vim @ 22441:a3bb84cd0f59

Update runtime files. Commit: https://github.com/vim/vim/commit/d58a3bf7dac8d53faf42e13cc1152b110f12c404 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 28 21:48:16 2020 +0200 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Mon, 28 Sep 2020 22:00:05 +0200
parents 3a1ed539ae2a
children 17c4178f26ea
comparison
equal deleted inserted replaced
22440:d892cdd2eca4 22441:a3bb84cd0f59
1 " Vim syntax file 1 " Vim syntax file
2 " Language: Vim 8.0 script 2 " Language: Vim 8.0 script
3 " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz> 3 " Maintainer: Charles E. Campbell <NdrOchipS@PcampbellAfamily.Mbiz>
4 " Last Change: July 15, 2020 4 " Last Change: Aug 30, 2020
5 " Version: 8.0-41 5 " Version: 8.0-43
6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM 6 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM
7 " Automatically generated keyword lists: {{{1 7 " Automatically generated keyword lists: {{{1
8 8
9 " Quit when a syntax file was already loaded {{{2 9 " Quit when a syntax file was already loaded {{{2
10 if exists("b:current_syntax") 10 if exists("b:current_syntax")
234 endif 234 endif
235 235
236 " Functions : Tag is provided for those who wish to highlight tagged functions {{{2 236 " Functions : Tag is provided for those who wish to highlight tagged functions {{{2
237 " ========= 237 " =========
238 syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID 238 syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID
239 syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand 239 syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimEnvvar,vimExecute,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimGlobal,vimHighlight,vimIsCommand,vimLet,vimLetHereDoc,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSearch,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand
240 syn match vimFunction "\<\(fu\%[nction]\|def\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody 240 syn match vimFunction "\<\(fu\%[nction]\|def\)!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody
241 241
242 if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f' 242 if exists("g:vimsyn_folding") && g:vimsyn_folding =~# 'f'
243 syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList 243 syn region vimFuncBody contained fold start="\ze\s*(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\|enddef\>\)" contains=@vimFuncBodyList
244 else 244 else
264 264
265 " User-Specified Commands: {{{2 265 " User-Specified Commands: {{{2
266 " ======================= 266 " =======================
267 syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine 267 syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vim9Comment,vimCtrlChar,vimEscapeBrace,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine
268 syn keyword vimUserCommand contained com[mand] 268 syn keyword vimUserCommand contained com[mand]
269 syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList 269 syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserAttrbError,vimUserCommand,@vimUserCmdList,vimComFilter
270 syn match vimUserAttrbError contained "-\a\+\ze\s" 270 syn match vimUserAttrbError contained "-\a\+\ze\s"
271 syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper 271 syn match vimUserAttrb contained "-nargs=[01*?+]" contains=vimUserAttrbKey,vimOper
272 syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError 272 syn match vimUserAttrb contained "-complete=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError
273 syn match vimUserAttrb contained "-range\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey 273 syn match vimUserAttrb contained "-range\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
274 syn match vimUserAttrb contained "-count\(=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey 274 syn match vimUserAttrb contained "-count\(=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey
293 syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString 293 syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString
294 syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString 294 syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString
295 syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString 295 syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString
296 syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' 296 syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"'
297 " Vim9 comments - TODO: might be highlighted while they don't work 297 " Vim9 comments - TODO: might be highlighted while they don't work
298 syn match vim9Comment excludenl +^#[^{].*$+ contains=@vimCommentGroup,vimCommentString
299 syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString 298 syn match vim9Comment excludenl +\s#[^{].*$+lc=1 contains=@vimCommentGroup,vimCommentString
300 syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString 299 syn match vim9Comment +\<endif\s\+#[^{].*$+lc=5 contains=@vimCommentGroup,vimCommentString
301 syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString 300 syn match vim9Comment +\<else\s\+#[^{].*$+lc=4 contains=@vimCommentGroup,vimCommentString
302 " Vim9 comment inside expression 301 " Vim9 comment inside expression
303 syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString 302 syn match vim9Comment +\s\zs#[^{].*$+ms=s+1 contains=@vimCommentGroup,vimCommentString
303 syn match vim9Comment +^\s*#[^{].*$+ contains=@vimCommentGroup,vimCommentString
304 syn match vim9Comment +^\s*#$+ contains=@vimCommentGroup,vimCommentString
304 305
305 " Environment Variables: {{{2 306 " Environment Variables: {{{2
306 " ===================== 307 " =====================
307 syn match vimEnvvar "\$\I\i*" 308 syn match vimEnvvar "\$\I\i*"
308 syn match vimEnvvar "\${\I\i*}" 309 syn match vimEnvvar "\${\I\i*}"
368 369
369 syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1 370 syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1
370 syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1 371 syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1
371 372
372 syn match vimFilter "^!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile 373 syn match vimFilter "^!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
373 syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile 374 syn match vimFilter contained "!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
375 syn match vimComFilter contained "|!!\=[^"]\{-}\(|\|\ze\"\|$\)" contains=vimOper,vimSpecFile
374 376
375 " Complex Repeats: (:h complex-repeat) {{{2 377 " Complex Repeats: (:h complex-repeat) {{{2
376 " =============== 378 " ===============
377 syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 379 syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1
378 syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' 380 syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)'
384 syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand 386 syn match vimSetSep contained "[,:]" skipwhite nextgroup=vimCommand
385 syn match vimSetMod contained "&vim\=\|[!&?<]\|all&" 387 syn match vimSetMod contained "&vim\=\|[!&?<]\|all&"
386 388
387 " Let: {{{2 389 " Let: {{{2
388 " === 390 " ===
389 syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc 391 syn keyword vimLet let var unl[et] skipwhite nextgroup=vimVar,vimFuncVar,vimLetHereDoc
390 VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\>\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' contains=vimComment,vim9Comment 392 VimFoldh syn region vimLetHereDoc matchgroup=vimLetHereDocStart start='=<<\s\+\%(trim\>\)\=\s*\z(\L\S*\)' matchgroup=vimLetHereDocStop end='^\s*\z1\s*$' contains=vimComment,vim9Comment
391 393
392 " Abbreviations: {{{2 394 " Abbreviations: {{{2
393 " ============= 395 " =============
394 syn keyword vimAbb ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbrev] ia[bbrev] skipwhite nextgroup=vimMapMod,vimMapLhs 396 syn keyword vimAbb ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbrev] ia[bbrev] skipwhite nextgroup=vimMapMod,vimMapLhs
395 397
396 " Autocmd: {{{2 398 " Autocmd: {{{2
397 " ======= 399 " =======
398 syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace 400 syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace
399 syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList 401 syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList
400 syn match vimAutoCmdSfxList contained "\S*" 402 syn match vimAutoCmdSfxList contained "\S*" skipwhite nextgroup=vimAutoCmdMod
401 syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList 403 syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList
404 syn match vimAutoCmdMod "\(++\)\=\(once\|nested\)"
402 405
403 " Echo And Execute: -- prefer strings! {{{2 406 " Echo And Execute: -- prefer strings! {{{2
404 " ================ 407 " ================
405 syn region vimEcho oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimFuncVar,vimString,vimVar 408 syn region vimEcho oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimFuncVar,vimString,vimVar
406 syn region vimExecute oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimFuncVar,vimIsCommand,vimOper,vimNotation,vimOperParen,vimString,vimVar 409 syn region vimExecute oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimFuncVar,vimIsCommand,vimOper,vimNotation,vimOperParen,vimString,vimVar
632 syn match vimCtrlChar "[- -]" 635 syn match vimCtrlChar "[- -]"
633 636
634 " Beginners - Patterns that involve ^ {{{2 637 " Beginners - Patterns that involve ^ {{{2
635 " ========= 638 " =========
636 syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle 639 syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
637 syn match vim9LineComment +^[ \t:]*#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle 640 syn match vim9LineComment +^[ \t]*#.*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle
638 syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup 641 syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup
639 syn match vimContinue "^\s*\\" 642 syn match vimContinue "^\s*\\"
640 syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue 643 syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue
641 syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained 644 syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained
642 645
859 hi def link vimAugroupKey vimCommand 862 hi def link vimAugroupKey vimCommand
860 hi def link vimAuHighlight vimHighlight 863 hi def link vimAuHighlight vimHighlight
861 hi def link vimAutoCmdOpt vimOption 864 hi def link vimAutoCmdOpt vimOption
862 hi def link vimAutoCmd vimCommand 865 hi def link vimAutoCmd vimCommand
863 hi def link vimAutoEvent Type 866 hi def link vimAutoEvent Type
867 hi def link vimAutoCmdMod Special
864 hi def link vimAutoSet vimCommand 868 hi def link vimAutoSet vimCommand
865 hi def link vimBehaveModel vimBehave 869 hi def link vimBehaveModel vimBehave
866 hi def link vimBehave vimCommand 870 hi def link vimBehave vimCommand
867 hi def link vimBracket Delimiter 871 hi def link vimBracket Delimiter
868 hi def link vimCmplxRepeat SpecialChar 872 hi def link vimCmplxRepeat SpecialChar