This commit is contained in:
Adam Stankiewicz
2018-10-08 19:00:59 +02:00
parent 055f7710b6
commit fd74d8b2b1
59 changed files with 2570 additions and 1908 deletions

View File

@@ -5,11 +5,11 @@ syn keyword jenkinsfileBuiltInVariable currentBuild
syn keyword jenkinsfileSection pipeline agent stages steps
syn keyword jenkinsfileDirective environment options parameters triggers stage tools input when
syn keyword jenkinsfileDirective environment options parameters triggers stage tools input when libraries
syn keyword jenkinsfileOption contained buildDiscarder disableConcurrentBuilds overrideIndexTriggers skipDefaultCheckout nextgroup=jenkinsfileOptionParams
syn keyword jenkinsfileOption contained skipStagesAfterUnstable checkoutToSubdirectory timeout retry timestamps nextgroup=jenkinsfileOptionParams
syn region jenkinsfileOptionParams contained start="(" end=")" transparent contains=@groovyTop
syn region jenkinsfileOptionParams contained start='(' end=')' transparent contains=@groovyTop
syn match jenkinsfileOptionO /[a-zA-Z]\+([^)]*)/ contains=jenkinsfileOption,jenkinsfileOptionParams transparent containedin=groovyParenT1
syn keyword jenkinsfileCoreStep checkout
@@ -24,9 +24,9 @@ syn keyword jenkinsfileCoreStep step
syn keyword jenkinsfileCoreStep tool
" TODO: These should probably be broken out.
syn keyword jenkinsfileCoreStep post always changed failure success unstable aborted
syn keyword jenkinsfileCoreStep post always changed failure success unstable aborted
syn region jenkinsFileDockerConfigBlock contained start="{" end="}" contains=groovyString,jenkinsfileDockerKeyword transparent
syn region jenkinsFileDockerConfigBlock contained start='{' end='}' contains=groovyString,jenkinsfileDockerKeyword transparent
syn keyword jenkinsFileDockerKeyword contained image args dockerfile additionalBuildArgs
syn keyword jenkinsfilePipelineStep Applitools ArtifactoryGradleBuild Consul MavenDescriptorStep OneSky VersionNumber
@@ -123,6 +123,8 @@ hi link jenkinsfilePipelineStep Include
hi link jenkinsfileBuiltInVariable Identifier
hi link jenkinsFileDockerKeyword jenkinsfilePipelineStep
let b:current_syntax = "Jenkinsfile"
let b:current_syntax = 'Jenkinsfile'
" vim:set et sw=0 ts=2 ft=vim tw=78:
endif

View File

@@ -19,7 +19,7 @@ else
endif
syn keyword carpSyntax def defn let do if while ref address set! the
syn keyword carpSyntax defmacro defdynamic quote cons list array
syn keyword carpSyntax defmacro defdynamic quote cons list array fn
syn keyword carpSyntax expand deftype register system-include register-type
syn keyword carpSyntax defmodule copy use module defalias definterface eval
syn keyword carpSyntax expand instantiate type info help quit env build run
@@ -64,6 +64,7 @@ syn cluster carpQuotedOrNormal contains=carpDelimiter
syn region carpQuotedStruc start="@("rs=s+2 end=")"re=e-1 contains=@carpQuotedStuff,@carpQuotedOrNormal contained
syn region carpQuotedStruc start="&("rs=s+2 end=")"re=e-1 contains=@carpQuotedStuff,@carpQuotedOrNormal contained
syn region carpQuotedStruc start="("rs=s+1 end=")"re=e-1 contains=@carpQuotedStuff,@carpQuotedOrNormal contained
syn region carpQuotedStruc start="{"rs=s+1 end="}"re=e-1 contains=@carpQuotedStuff,@carpQuotedOrNormal contained
syn region carpQuotedStruc start="\["rs=s+1 end="\]"re=e-1 contains=@carpQuotedStuff,@carpQuotedOrNormal contained
syn cluster carpQuotedStuff add=carpQuotedStruc
@@ -73,6 +74,7 @@ syn region carpStruc matchgroup=Delimiter start="&("rs=s+2 matchgroup=Delimiter
syn region carpStruc matchgroup=Delimiter start="&"rs=s+1 end=![ \t()\[\]";]!me=e-1 contains=@carpNormal
syn region carpStruc matchgroup=Delimiter start="@"rs=s+1 end=![ \t()\[\]";]!me=e-1 contains=@carpNormal
syn region carpStruc matchgroup=Delimiter start="("rs=s+1 matchgroup=Delimiter end=")"re=e-1 contains=@carpNormal
syn region carpStruc matchgroup=Delimiter start="{"rs=s+1 matchgroup=Delimiter end="}"re=e-1 contains=@carpNormal
syn region carpStruc matchgroup=Delimiter start="\["rs=s+1 matchgroup=Delimiter end="\]"re=e-1 contains=@carpNormal
syn region carpString start=/\%(\\\)\@<!"/ skip=/\\[\\"]/ end=/"/

View File

@@ -23,7 +23,7 @@ endif
" Operators
if exists('g:crystal_operators')
syn match crystalOperator "[~!^&|*/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@<!>\|\*\*\|\.\.\.\|\.\.\|::"
syn match crystalOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!="
syn match crystalOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=\|//"
syn region crystalBracketOperator matchgroup=crystalOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@crystalNotTop
endif
@@ -31,11 +31,11 @@ endif
syn match crystalStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display
syn match crystalStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
syn region crystalInterpolation matchgroup=crystalInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,@crystalNotTop
syn match crystalInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=crystalInterpolationDelimiter,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable,crystalPredefinedVariable
syn match crystalInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained
syn match crystalInterpolation "#\$\%(-\w\|\W\)" display contained contains=crystalInterpolationDelimiter,crystalPredefinedVariable,crystalInvalidVariable
syn match crystalInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained
syn region crystalInterpolation matchgroup=crystalInterpolationDelim start="#{" end="}" contained contains=ALLBUT,@crystalNotTop
syn match crystalInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=crystalInterpolationDelim,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable,crystalPredefinedVariable
syn match crystalInterpolationDelim "#\ze\%(\$\|@@\=\)\w\+" display contained
syn match crystalInterpolation "#\$\%(-\w\|\W\)" display contained contains=crystalInterpolationDelim,crystalPredefinedVariable,crystalInvalidVariable
syn match crystalInterpolationDelim "#\ze\$\%(-\w\|\W\)" display contained
syn region crystalNoInterpolation start="\\#{" end="}" contained
syn match crystalNoInterpolation "\\#{" display contained
syn match crystalNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained
@@ -232,11 +232,13 @@ if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive')
syn region crystalArrayLiteral matchgroup=crystalArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@crystalNotTop fold
" statements without 'do'
syn region crystalBlockExpression matchgroup=crystalControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@crystalNotTop fold
syn region crystalCaseExpression matchgroup=crystalConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@crystalNotTop fold
syn region crystalBlockExpression matchgroup=crystalControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@crystalNotTop fold
syn region crystalCaseExpression matchgroup=crystalConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@crystalNotTop fold
syn region crystalSelectExpression matchgroup=crystalConditional start="\<select\>" end="\<end\>" contains=ALLBUT,@crystalNotTop fold
syn region crystalConditionalExpression matchgroup=crystalConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|ifdef\|unless\)\>" end="\%(\%(\%(\.\@<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@crystalNotTop fold
syn match crystalConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=crystalCaseExpression
syn match crystalConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=crystalCaseExpression
syn match crystalConditional "\<\%(when\|else\)\>[?!]\@!" contained containedin=crystalSelectExpression
syn match crystalConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=crystalConditionalExpression
syn match crystalExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=crystalBlockExpression
@@ -313,78 +315,73 @@ syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(loop\|private\|pr
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(require\|raise\)\>" transparent contains=NONE
syn match crystalKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(typeof\|pointerof\|sizeof\|instance_sizeof\|\)\>" transparent contains=NONE
hi def link crystalClass crystalDefine
hi def link crystalModule crystalDefine
hi def link crystalStruct crystalDefine
hi def link crystalClass crystalDefine
hi def link crystalModule crystalDefine
hi def link crystalStruct crystalDefine
hi def link crystalLib crystalDefine
hi def link crystalMacro crystalDefine
hi def link crystalMacro crystalDefine
hi def link crystalEnum crystalDefine
hi def link crystalMethodExceptional crystalDefine
hi def link crystalDefine Define
hi def link crystalDefine Define
hi def link crystalFunction Function
hi def link crystalConditional Conditional
hi def link crystalConditionalModifier crystalConditional
hi def link crystalExceptional crystalConditional
hi def link crystalRepeat Repeat
hi def link crystalRepeatModifier crystalRepeat
hi def link crystalRepeat Repeat
hi def link crystalRepeatModifier crystalRepeat
hi def link crystalOptionalDo crystalRepeat
hi def link crystalControl Statement
hi def link crystalInclude Include
hi def link crystalRecord Statement
hi def link crystalInteger Number
hi def link crystalControl Statement
hi def link crystalInclude Include
hi def link crystalRecord Statement
hi def link crystalInteger Number
hi def link crystalASCIICode Character
hi def link crystalFloat Float
hi def link crystalBoolean Boolean
hi def link crystalFloat Float
hi def link crystalBoolean Boolean
hi def link crystalException Exception
if !exists('g:crystal_no_identifiers')
hi def link crystalIdentifier Identifier
else
hi def link crystalIdentifier NONE
endif
hi def link crystalClassVariable crystalIdentifier
hi def link crystalClassVariable crystalIdentifier
hi def link crystalConstant Type
hi def link crystalGlobalVariable crystalIdentifier
hi def link crystalBlockParameter crystalIdentifier
hi def link crystalGlobalVariable crystalIdentifier
hi def link crystalBlockParameter crystalIdentifier
hi def link crystalInstanceVariable crystalIdentifier
hi def link crystalFreshVariable crystalIdentifier
hi def link crystalPredefinedIdentifier crystalIdentifier
hi def link crystalPredefinedConstant crystalPredefinedIdentifier
hi def link crystalPredefinedVariable crystalPredefinedIdentifier
hi def link crystalSymbol Constant
hi def link crystalKeyword Keyword
hi def link crystalSymbol Constant
hi def link crystalKeyword Keyword
hi def link crystalOperator Operator
hi def link crystalAccess Statement
hi def link crystalAccess Statement
hi def link crystalAttribute Statement
hi def link crystalPseudoVariable Constant
hi def link crystalPseudoVariable Constant
hi def link crystalCharLiteral Character
hi def link crystalComment Comment
hi def link crystalComment Comment
hi def link crystalTodo Todo
hi def link crystalStringEscape Special
hi def link crystalInterpolationDelimiter Delimiter
hi def link crystalNoInterpolation crystalString
hi def link crystalInterpolationDelim Delimiter
hi def link crystalNoInterpolation crystalString
hi def link crystalSharpBang PreProc
hi def link crystalRegexpDelimiter crystalStringDelimiter
hi def link crystalSymbolDelimiter crystalStringDelimiter
hi def link crystalStringDelimiter Delimiter
hi def link crystalHeredoc crystalString
hi def link crystalString String
hi def link crystalRegexpDelimiter crystalStringDelimiter
hi def link crystalSymbolDelimiter crystalStringDelimiter
hi def link crystalStringDelimiter Delimiter
hi def link crystalString String
hi def link crystalHeredoc crystalString
hi def link crystalRegexpEscape crystalRegexpSpecial
hi def link crystalRegexpQuantifier crystalRegexpSpecial
hi def link crystalRegexpAnchor crystalRegexpSpecial
hi def link crystalRegexpDot crystalRegexpCharClass
hi def link crystalRegexpCharClass crystalRegexpSpecial
hi def link crystalRegexpSpecial Special
hi def link crystalRegexpComment Comment
hi def link crystalRegexp crystalString
hi def link crystalLinkAttr PreProc
hi def link crystalRegexpCharClass crystalRegexpSpecial
hi def link crystalRegexpSpecial Special
hi def link crystalRegexpComment Comment
hi def link crystalRegexp crystalString
hi def link crystalMacro PreProc
hi def link crystalInvalidVariable Error
hi def link crystalError Error
hi def link crystalLinkAttr crystalMacro
hi def link crystalError Error
hi def link crystalInvalidVariable crystalError
hi def link crystalSpaceError crystalError
let b:current_syntax = 'crystal'

View File

@@ -20,7 +20,7 @@ endif
syn include @gitcommitDiff syntax/diff.vim
syn region gitcommitDiff start=/\%(^diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|#\)\@=/ fold contains=@gitcommitDiff
syn match gitcommitSummary "^.\{0,50\}" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
syn match gitcommitSummary ".*\%<50v" contained containedin=gitcommitFirstLine nextgroup=gitcommitOverflow contains=@Spell
syn match gitcommitOverflow ".*" contained contains=@Spell
syn match gitcommitBlank "^[^#].*" contained contains=@Spell

View File

@@ -49,12 +49,12 @@ hi def link goFloats Type
hi def link goComplexes Type
" Predefined functions and values
syn match goBuiltins /\<\v(append|cap|close|complex|copy|delete|imag|len)\ze\(/
syn match goBuiltins /\<\v(make|new|panic|print|println|real|recover)\ze\(/
syn keyword goBuiltins append cap close complex copy delete imag len
syn keyword goBuiltins make new panic print println real recover
syn keyword goBoolean true false
syn keyword goPredefinedIdentifiers nil iota
hi def link goBuiltins Keyword
hi def link goBuiltins Identifier
hi def link goBoolean Boolean
hi def link goPredefinedIdentifiers goBoolean
@@ -150,14 +150,14 @@ endif
" var, const
if go#config#FoldEnable('varconst')
syn region goVar start='var (' end='^\s*)$' transparent fold
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goArgumentName,goArgumentType,goSimpleArguments
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goArgumentName,goArgumentType,goSimpleArguments,goPointerOperator
syn region goConst start='const (' end='^\s*)$' transparent fold
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goArgumentName,goArgumentType,goSimpleArguments
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goArgumentName,goArgumentType,goSimpleArguments,goPointerOperator
else
syn region goVar start='var (' end='^\s*)$' transparent
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goArgumentName,goArgumentType,goSimpleArguments
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goArgumentName,goArgumentType,goSimpleArguments,goPointerOperator
syn region goConst start='const (' end='^\s*)$' transparent
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goArgumentName,goArgumentType,goSimpleArguments
\ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goArgumentName,goArgumentType,goSimpleArguments,goPointerOperator
endif
" Single-line var, const, and import.
@@ -216,6 +216,7 @@ endif
" Extra types commonly seen
if go#config#HighlightExtraTypes()
syn match goExtraType /\<bytes\.\(Buffer\)\>/
syn match goExtraType /\<context\.\(Context\)\>/
syn match goExtraType /\<io\.\(Reader\|ReadSeeker\|ReadWriter\|ReadCloser\|ReadWriteCloser\|Writer\|WriteCloser\|Seeker\)\>/
syn match goExtraType /\<reflect\.\(Kind\|Type\|Value\)\>/
syn match goExtraType /\<unsafe\.Pointer\>/

50
syntax/gomod.vim Normal file
View File

@@ -0,0 +1,50 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1
" gomod.vim: Vim syntax file for go.mod file
"
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
finish
endif
syntax case match
" match keywords
syntax keyword gomodModule module
syntax keyword gomodRequire require
syntax keyword gomodExclude exclude
syntax keyword gomodReplace replace
" require, exclude and replace can be also grouped into block
syntax region gomodRequire start='require (' end=')' transparent contains=gomodRequire,gomodVersion
syntax region gomodExclude start='exclude (' end=')' transparent contains=gomodExclude,gomodVersion
syntax region gomodReplace start='replace (' end=')' transparent contains=gomodReplace,gomodVersion
" set highlights
highlight default link gomodModule Keyword
highlight default link gomodRequire Keyword
highlight default link gomodExclude Keyword
highlight default link gomodReplace Keyword
" comments are always in form of // ...
syntax region gomodComment start="//" end="$" contains=@Spell
highlight default link gomodComment Comment
" make sure quoted import paths are higlighted
syntax region gomodString start=+"+ skip=+\\\\\|\\"+ end=+"+
highlight default link gomodString String
" replace operator is in the form of '=>'
syntax match gomodReplaceOperator "\v\=\>"
highlight default link gomodReplaceOperator Operator
" highlight semver, note that this is very simple. But it works for now
syntax match gomodVersion "v\d\+\.\d\+\.\d\+"
syntax match gomodVersion "v\d\+\.\d\+\.\d\+-\S*"
syntax match gomodVersion "v\d\+\.\d\+\.\d\++incompatible"
highlight default link gomodVersion Identifier
let b:current_syntax = "gomod"
endif

View File

@@ -53,7 +53,7 @@ syntax keyword jsFrom contained from skipwhite skipempty nextgroup
syntax match jsModuleComma contained /,/ skipwhite skipempty nextgroup=jsModuleKeyword,jsModuleAsterisk,jsModuleGroup,jsFlowTypeKeyword
" Strings, Templates, Numbers
syntax region jsString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1\|$+ contains=jsSpecial,@Spell extend
syntax region jsString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ end=+$+ contains=jsSpecial,@Spell extend
syntax region jsTemplateString start=+`+ skip=+\\`+ end=+`+ contains=jsTemplateExpression,jsSpecial,@Spell extend
syntax match jsTaggedTemplate /\<\K\k*\ze`/ nextgroup=jsTemplateString
syntax match jsNumber /\c\<\%(\d\+\%(e[+-]\=\d\+\)\=\|0b[01]\+\|0o\o\+\|0x\x\+\)\>/
@@ -150,8 +150,8 @@ syntax region jsTryCatchBlock contained matchgroup=jsTryCatchBraces s
syntax region jsFinallyBlock contained matchgroup=jsFinallyBraces start=/{/ end=/}/ contains=@jsAll,jsBlock extend fold
syntax region jsSwitchBlock contained matchgroup=jsSwitchBraces start=/{/ end=/}/ contains=@jsAll,jsBlock,jsSwitchCase extend fold
syntax region jsRepeatBlock contained matchgroup=jsRepeatBraces start=/{/ end=/}/ contains=@jsAll,jsBlock extend fold
syntax region jsDestructuringBlock contained matchgroup=jsDestructuringBraces start=/{/ end=/}/ contains=jsDestructuringProperty,jsDestructuringAssignment,jsDestructuringNoise,jsDestructuringPropertyComputed,jsSpreadExpression,jsComment extend fold
syntax region jsDestructuringArray contained matchgroup=jsDestructuringBraces start=/\[/ end=/\]/ contains=jsDestructuringPropertyValue,jsNoise,jsDestructuringProperty,jsSpreadExpression,jsDestructuringBlock,jsDestructuringArray,jsComment extend fold
syntax region jsDestructuringBlock contained matchgroup=jsDestructuringBraces start=/{/ end=/}/ contains=jsDestructuringProperty,jsDestructuringAssignment,jsDestructuringNoise,jsDestructuringPropertyComputed,jsSpreadExpression,jsComment nextgroup=jsFlowDefinition extend fold
syntax region jsDestructuringArray contained matchgroup=jsDestructuringBraces start=/\[/ end=/\]/ contains=jsDestructuringPropertyValue,jsNoise,jsDestructuringProperty,jsSpreadExpression,jsDestructuringBlock,jsDestructuringArray,jsComment nextgroup=jsFlowDefinition extend fold
syntax region jsObject contained matchgroup=jsObjectBraces start=/{/ end=/}/ contains=jsObjectKey,jsObjectKeyString,jsObjectKeyComputed,jsObjectShorthandProp,jsObjectSeparator,jsObjectFuncName,jsObjectMethodType,jsGenerator,jsComment,jsObjectStringKey,jsSpreadExpression,jsDecorator,jsAsyncKeyword extend fold
syntax region jsBlock matchgroup=jsBraces start=/{/ end=/}/ contains=@jsAll,jsSpreadExpression extend fold
syntax region jsModuleGroup contained matchgroup=jsModuleBraces start=/{/ end=/}/ contains=jsModuleKeyword,jsModuleComma,jsModuleAs,jsComment,jsFlowTypeKeyword skipwhite skipempty nextgroup=jsFrom fold

View File

@@ -32,15 +32,15 @@ if !exists("b:julia_syntax_highlight_deprecated")
let b:julia_syntax_highlight_deprecated = get(g:, "julia_syntax_highlight_deprecated", 0)
endif
if b:julia_syntax_version =~? '\<\%(curr\%(ent\)\?\|release\|6\|0\.6\)\>'
if b:julia_syntax_version =~? '\<\%(curr\%(ent\)\?\|release\|7\|0\.7\|10\|1.0\)\>'
let b:julia_syntax_version = 10
elseif b:julia_syntax_version =~? '\<\%(next\|devel\|11\|1\.1\)\>'
let b:julia_syntax_version = 11
elseif b:julia_syntax_version =~? '\<\%(prev\%(ious\)\?\|legacy\|6\|0\.6\)\>'
let b:julia_syntax_version = 6
elseif b:julia_syntax_version =~? '\<\%(next\|devel\|7\|0\.7\)\>'
let b:julia_syntax_version = 7
elseif b:julia_syntax_version =~? '\<\%(prev\%(ious\)\?\|legacy\|5\|0\.5\)\>'
let b:julia_syntax_version = 5
else
echohl WarningMsg | echomsg "Unrecognized or unsupported julia syntax version: " . b:julia_syntax_version | echohl None
let b:julia_syntax_version = 6
let b:julia_syntax_version = 10
endif
let s:julia_spellcheck_strings = get(g:, "julia_spellcheck_strings", 0)
@@ -96,39 +96,29 @@ syntax cluster juliaExprsPrintf contains=@juliaExpressions,@juliaPrintfItems
syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar
syntax cluster juliaKeywordItems contains=juliaKeyword,juliaInfixKeyword,juliaRepKeyword,juliaTypedef
if b:julia_syntax_version == 5
syntax cluster juliaBlocksItems contains=@juliaBlocksItemsAll
syntax cluster juliaBlocksItems contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock,juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock
if b:julia_syntax_version == 6
syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems06
else
syntax cluster juliaBlocksItems contains=@juliaBlocksItemsAll,@juliaBlocksItems0607
endif
syntax cluster juliaBlocksItemsAll contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock
syntax cluster juliaBlocksItems0607 contains=juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock
if b:julia_syntax_version == 5
syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems05,@juliaTypesItems0506
elseif b:julia_syntax_version == 6
syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems05,@juliaTypesItems0506,@juliaTypesItems0607
else
syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems05,@juliaTypesItems0506,@juliaTypesItems0607,@juliaTypesItems07
syntax cluster juliaTypesItems contains=@juliaTypesItemsAll,@juliaTypesItems06,@juliaTypesItems1011
endif
syntax cluster juliaTypesItemsAll contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther
syntax cluster juliaTypesItems05 contains=juliaBaseTypeIter05,juliaBaseTypeRange05
syntax cluster juliaTypesItems0506 contains=juliaBaseTypeNum0506,juliaBaseTypeRange0506,juliaBaseTypeDict0506,juliaBaseTypeSet0506
syntax cluster juliaTypesItems0607 contains=juliaBaseTypeBasic0607,juliaBaseTypeArray0607,juliaBaseTypeSet0607,juliaBaseTypeProcess0607,juliaBaseTypeRange0607,juliaBaseTypeTime0607
syntax cluster juliaTypesItems07 contains=juliaBaseTypeBasic07,juliaBaseTypeNum07,juliaBaseTypeError07,juliaBaseTypeIter07,juliaBaseTypeRange07,juliaBaseTypeArray07,juliaBaseTypeDict07,juliaBaseTypeSet07,juliaBaseTypeC07,juliaBaseTypeDisplay07,juliaBaseTypeIO07
syntax cluster juliaTypesItems06 contains=juliaBaseTypeNum06,juliaBaseTypeRange06,juliaBaseTypeDict06,juliaBaseTypeSet06
syntax cluster juliaTypesItems1011 contains=juliaBaseTypeBasic1011,juliaBaseTypeNum1011,juliaBaseTypeError1011,juliaBaseTypeIter1011,juliaBaseTypeRange1011,juliaBaseTypeArray1011,juliaBaseTypeDict1011,juliaBaseTypeSet1011,juliaBaseTypeC1011,juliaBaseTypeDisplay1011,juliaBaseTypeIO1011,juliaBaseTypeString1011
syntax cluster juliaConstItemsAll contains=juliaConstNum,juliaConstBool,juliaConstEnv,juliaConstMMap,juliaConstC,juliaConstGeneric
syntax cluster juliaConstItems0506 contains=juliaConstNum0506,juliaConstIO0506
syntax cluster juliaConstItems07 contains=juliaConstGeneric07,juliaPossibleEuler,juliaConstEnv07,juliaConstIO07
if b:julia_syntax_version <= 6
syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems0506
syntax cluster juliaConstItems06 contains=juliaConstNum06,juliaConstIO06
syntax cluster juliaConstItems1011 contains=juliaConstGeneric1011,juliaPossibleEuler,juliaConstEnv1011,juliaConstIO1011
if b:julia_syntax_version == 6
syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems06
else
syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems0506,@juliaConstItems07
syntax cluster juliaConstItems contains=@juliaConstItemsAll,@juliaConstItems06,@juliaConstItems1011
endif
syntax cluster juliaMacroItems contains=juliaPossibleMacro,juliaDollarVar,juliaDollarPar,juliaDollarSqBra
syntax cluster juliaSymbolItems contains=juliaPossibleSymbol
syntax cluster juliaNumberItems contains=juliaNumbers
syntax cluster juliaStringItems contains=juliaChar,juliaString,juliabString,juliasString,juliavString,juliaipString,juliabigString,juliaMIMEString,juliaShellString,juliaDocString,juliaRegEx
syntax cluster juliaStringItems contains=juliaChar,juliaString,juliaStringPrefixed,juliabString,juliasString,juliavString,juliaipString,juliabigString,juliaMIMEString,juliarawString,juliatextString,juliahtmlString,juliaint128String,juliaShellString,juliaDocString,juliaRegEx
syntax cluster juliaPrintfItems contains=juliaPrintfParBlock,juliaPrintfString
syntax cluster juliaOperatorItems contains=juliaOperator,juliaRangeOperator,juliaCTransOperator,juliaTernaryRegion,juliaColon,juliaSemicolon,juliaComma
syntax cluster juliaCommentItems contains=juliaCommentL,juliaCommentM
@@ -166,16 +156,8 @@ syntax region juliaParBlockInRange matchgroup=juliaParDelim contained start="("
syntax region juliaSqBraBlock matchgroup=juliaParDelim start="\[" end="\]" contains=@juliaExpressions,juliaParBlockInRange,juliaRangeEnd,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS
syntax region juliaCurBraBlock matchgroup=juliaParDelim start="{" end="}" contains=@juliaExpressions
if b:julia_syntax_version >= 6
let s:keywords = '\<\%(return\|local\|global\|import\%(all\)\?\|export\|using\|const\|where\)\>'
let s:infixkeywords = '\<\%(in\|isa\)\>'
else
let s:keywords = '\<\%(return\|local\|global\|import\%(all\)\?\|export\|using\|const\)\>'
let s:infixkeywords = '\<\%(in\)\>'
endif
exec 'syntax match juliaKeyword display "' . s:keywords . '"'
exec 'syntax match juliaInfixKeyword display "\%(=\s*\)\@<!' . s:infixkeywords . '\S\@!\%(\s*=\)\@!"'
syntax match juliaKeyword display "\<\%(return\|local\|global\|import\%(all\)\?\|export\|using\|const\|where\)\>"
syntax match juliaInfixKeyword display "\%(=\s*\)\@<!\<\%(in\|isa\)\>\S\@!\%(\s*=\)\@!"
syntax match juliaRepKeyword display "\<\%(break\|continue\)\>"
syntax region juliaConditionalBlock matchgroup=juliaConditional start="\<if\>" end="\<end\>" contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock fold
syntax region juliaConditionalEIBlock matchgroup=juliaConditional transparent contained start="\<elseif\>" end="\<\%(end\|else\|elseif\)\>"me=s-1 contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock
@@ -186,8 +168,10 @@ syntax region juliaBeginBlock matchgroup=juliaBlKeyword start="\<begin\>" end=
syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="\<function\>" end="\<end\>" contains=@juliaExpressions fold
syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="\<macro\>" end="\<end\>" contains=@juliaExpressions fold
syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="\<quote\>" end="\<end\>" contains=@juliaExpressions fold
syntax region juliaTypeBlock matchgroup=juliaBlKeyword start="\<type\>" end="\<end\>" contains=@juliaExpressions fold
syntax region juliaImmutableBlock matchgroup=juliaBlKeyword start="\<immutable\>" end="\<end\>" contains=@juliaExpressions fold
if b:julia_syntax_version <= 10
syntax region juliaTypeBlock matchgroup=juliaBlKeyword06 start="\<type\>" end="\<end\>" contains=@juliaExpressions fold
syntax region juliaImmutableBlock matchgroup=juliaBlKeyword06 start="\<immutable\>" end="\<end\>" contains=@juliaExpressions fold
endif
syntax region juliaStructBlock matchgroup=juliaBlKeyword start="\<struct\>" end="\<end\>" contains=@juliaExpressions fold
syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="\<mutable struct\>" end="\<end\>" contains=@juliaExpressions fold
syntax region juliaLetBlock matchgroup=juliaBlKeyword start="\<let\>" end="\<end\>" contains=@juliaExpressions fold
@@ -206,39 +190,34 @@ syntax match juliaComprehensionIf contained "\<if\>"
exec 'syntax match juliaOuter contained "\<outer\ze\s\+' . s:idregex . '\>"'
syntax match juliaBaseTypeBasic display "\<\%(Tuple\|NTuple\|Symbol\|\%(Intrinsic\)\?Function\|Union\|Type\%(Name\|Constructor\|Var\)\?\|Any\|ANY\|Vararg\|Top\|None\|Nothing\|Ptr\|Void\|Exception\|Module\|Box\|Expr\|LambdaStaticData\|\%(Data\|Union\)Type\|\%(LineNumber\|Label\|Goto\|Quote\|Top\|Symbol\|Getfield\)Node\|\%(Weak\|Global\)\?Ref\|Associative\|Method\(Table\)\?\|GetfieldNode\|Nullable\|Pair\|Val\|TypeMap\%(Level\|Entry\)\)\>"
syntax match juliaBaseTypeBasic0607 display "\<\%(UnionAll\|CodeInfo\)\>"
syntax match juliaBaseTypeBasic07 display "\<\%(Some\|Missing\)\>"
syntax match juliaBaseTypeBasic display "\<\%(Tuple\|NTuple\|Symbol\|Function\|Union\%(All\)\?\|Type\%(Name\|Var\)\?\|Any\|ANY\|Vararg\|Ptr\|Exception\|Module\|Expr\|DataType\|\%(LineNumber\|Quote\)Node\|\%(Weak\|Global\)\?Ref\|Method\|Pair\|Val\)\>"
syntax match juliaBaseTypeBasic06 display "\<\%(Void\|\%(Label\|Goto\)Node\|Associative\|MethodTable\|Nullable\|TypeMap\%(Level\|Entry\)\|CodeInfo\)\>"
syntax match juliaBaseTypeBasic1011 display "\<\%(Nothing\|Some\|Missing\)\>"
syntax match juliaBaseTypeNum display "\<\%(U\?Int\%(8\|16\|32\|64\|128\)\?\|Float\%(16\|32\|64\)\|Complex\|Bool\|Char\|Number\|Signed\|Unsigned\|Integer\|AbstractFloat\|Real\|Rational\|Irrational\|Enum\|BigInt\|BigFloat\|MathConst\)\>"
syntax match juliaBaseTypeNum0506 display "\<Complex\%(32\|64\|128\)\>"
syntax match juliaBaseTypeNum07 display "\<\%(AbstractIrrational\|ComplexF\%(16\|32\|64\)\)\>"
syntax match juliaBaseTypeNum06 display "\<Complex\%(32\|64\|128\)\>"
syntax match juliaBaseTypeNum1011 display "\<\%(AbstractIrrational\|ComplexF\%(16\|32\|64\)\)\>"
syntax match juliaBaseTypeC display "\<\%(FileOffset\|C\%(u\?\%(char\|short\|int\|long\(long\)\?\|w\?string\)\|float\|double\|\%(ptrdiff\|s\?size\|wchar\|off\|u\?intmax\)_t\)\)\>"
syntax match juliaBaseTypeC07 display "\<Cvoid\>"
syntax match juliaBaseTypeC1011 display "\<Cvoid\>"
syntax match juliaBaseTypeError display "\<\%(\%(Bounds\|Divide\|Domain\|\%(Stack\)\?Overflow\|EOF\|Undef\%(Ref\|Var\)\|System\|Type\|Parse\|Argument\|Key\|Load\|Method\|Inexact\|OutOfMemory\|Init\|Assertion\|Unicode\|ReadOnlyMemory\)Error\|\%(Interrupt\|Error\|ProcessExited\|Captured\|Composite\|InvalidState\|Null\|Remote\)Exception\|DimensionMismatch\|SegmentationFault\)\>"
syntax match juliaBaseTypeError07 display "\<\%(StringIndexError\|MissingException\)\>"
syntax match juliaBaseTypeError1011 display "\<\%(StringIndexError\|MissingException\)\>"
syntax match juliaBaseTypeIter display "\<\%(EachLine\|Enumerate\|Cartesian\%(Index\|Range\)\|LinSpace\)\>"
syntax match juliaBaseTypeIter05 display "\<\%(Zip\|Filter\)\>"
syntax match juliaBaseTypeIter07 display "\<CartesianIndices\>"
syntax match juliaBaseTypeIter1011 display "\<CartesianIndices\>"
syntax match juliaBaseTypeString display "\<\%(DirectIndex\|Sub\|Rep\|Rev\|Abstract\)\?String\>"
syntax match juliaBaseTypeArray display "\<\%(\%(Sub\)\?Array\|\%(Abstract\|Dense\|Strided\)\?\%(Array\|Matrix\|Vec\%(tor\|OrMat\)\)\|SparseMatrixCSC\|\%(AbstractSparse\|Bit\|Shared\)\%(Array\|Vector\|Matrix\)\|\%\(D\|Bid\|\%(Sym\)\?Trid\)iagonal\|Hermitian\|Symmetric\|UniformScaling\|\%(Lower\|Upper\)Triangular\|SparseVector\|VecElement\)\>"
syntax match juliaBaseTypeArray0607 display "\<\%(Conj\%(Array\|Matrix\|Vector\)\|Index\%(Cartesian\|Linear\|Style\)\|PermutedDimsArray\|RowVector\)\>"
syntax match juliaBaseTypeArray07 display "\<\%(BroadcastStyle\|Adjoint\|Transpose\|LinearIndices\)\>"
syntax match juliaBaseTypeString1011 display "\<SubstitutionString\>"
syntax match juliaBaseTypeArray display "\<\%(\%(Sub\)\?Array\|\%(Abstract\|Dense\|Strided\)\?\%(Array\|Matrix\|Vec\%(tor\|OrMat\)\)\|SparseMatrixCSC\|\%(AbstractSparse\|Bit\|Shared\)\%(Array\|Vector\|Matrix\)\|\%\(D\|Bid\|\%(Sym\)\?Trid\)iagonal\|Hermitian\|Symmetric\|UniformScaling\|\%(Lower\|Upper\)Triangular\|SparseVector\|VecElement\|Conj\%(Array\|Matrix\|Vector\)\|Index\%(Cartesian\|Linear\|Style\)\|PermutedDimsArray\|RowVector\)\>"
syntax match juliaBaseTypeArray1011 display "\<\%(Broadcast\|Adjoint\|Transpose\|LinearIndices\)\>"
syntax match juliaBaseTypeDict display "\<\%(WeakKey\)\?Dict\>"
syntax match juliaBaseTypeDict0506 display "\<ObjectIdDict\>"
syntax match juliaBaseTypeDict07 display "\<IdDict\>"
syntax match juliaBaseTypeSet display "\<Set\>"
syntax match juliaBaseTypeSet0506 display "\<IntSet\>"
syntax match juliaBaseTypeSet0607 display "\<AbstractSet\>"
syntax match juliaBaseTypeSet07 display "\<\%(\%(Bit\|Key\)Set\|AbstractDict\)\>"
syntax match juliaBaseTypeDict06 display "\<ObjectIdDict\>"
syntax match juliaBaseTypeDict1011 display "\<IdDict\>"
syntax match juliaBaseTypeSet display "\<\%(Set\|AbstractSet\)\>"
syntax match juliaBaseTypeSet06 display "\<IntSet\>"
syntax match juliaBaseTypeSet1011 display "\<\%(BitSet\|AbstractDict\)\>"
syntax match juliaBaseTypeIO display "\<\%(IO\%(Stream\|Buffer\|Context\)\?\|RawFD\|StatStruct\|FileMonitor\|PollingFileWatcher\|Timer\|Base64\%(Decode\|Encode\)Pipe\|\%(UDP\|TCP\)Socket\|\%(Abstract\)\?Channel\|BufferStream\|ReentrantLock\)\>"
syntax match juliaBaseTypeIO07 display "\<GenericIOBuffer\>"
syntax match juliaBaseTypeProcess display "\<\%(ProcessGroup\|Pipe\|Cmd\)\>"
syntax match juliaBaseTypeProcess0607 display "\<PipeBuffer\>"
syntax match juliaBaseTypeRange display "\<\%(Dims\|RangeIndex\|\%(Ordinal\|Step\|\%(Abstract\)\?Unit\)Range\|Colon\)\>"
syntax match juliaBaseTypeRange05 display "\<FloatRange\>"
syntax match juliaBaseTypeRange0506 display "\<Range\>"
syntax match juliaBaseTypeRange0607 display "\<\%(ExponentialBackOff\|StepRangeLen\)\>"
syntax match juliaBaseTypeRange07 display "\<\(Abstract\|Lin\)Range\>"
syntax match juliaBaseTypeIO1011 display "\<GenericIOBuffer\>"
syntax match juliaBaseTypeProcess display "\<\%(Pipe\|Cmd\|PipeBuffer\)\>"
syntax match juliaBaseTypeRange display "\<\%(Dims\|RangeIndex\|\%(Ordinal\|Step\|\%(Abstract\)\?Unit\)Range\|Colon\|ExponentialBackOff\|StepRangeLen\)\>"
syntax match juliaBaseTypeRange06 display "\<Range\>"
syntax match juliaBaseTypeRange1011 display "\<\(Abstract\|Lin\)Range\>"
syntax match juliaBaseTypeRegex display "\<Regex\%(Match\)\?\>"
syntax match juliaBaseTypeFact display "\<Factorization\>"
syntax match juliaBaseTypeSort display "\<\%(Insertion\|\(Partial\)\?Quick\|Merge\)Sort\>"
@@ -246,13 +225,12 @@ syntax match juliaBaseTypeRound display "\<Round\%(ingMode\|FromZero\|Down\|Ne
syntax match juliaBaseTypeSpecial display "\<\%(LocalProcess\|ClusterManager\)\>"
syntax match juliaBaseTypeRandom display "\<\%(AbstractRNG\|MersenneTwister\|RandomDevice\)\>"
syntax match juliaBaseTypeDisplay display "\<\%(Text\(Display\)\?\|Display\|MIME\|HTML\)\>"
syntax match juliaBaseTypeDisplay07 display "\<AbstractDisplay\>"
syntax match juliaBaseTypeTime display "\<\%(Date\%(Time\)\?\)\>"
syntax match juliaBaseTypeTime0607 display "\<DateFormat\>"
syntax match juliaBaseTypeDisplay1011 display "\<AbstractDisplay\>"
syntax match juliaBaseTypeTime display "\<\%(Date\%(Time\)\?\|DateFormat\)\>"
syntax match juliaBaseTypeOther display "\<\%(RemoteRef\|Task\|Condition\|VersionNumber\|IPv[46]\|SerializationState\|WorkerConfig\|Future\|RemoteChannel\|IPAddr\|Stack\%(Trace\|Frame\)\|\(Caching\|Worker\)Pool\|AbstractSerializer\)\>"
syntax match juliaConstNum display "\%(\<\%(\%(NaN\|Inf\)\%(16\|32\|64\)\?\|pi\|π\)\>\)"
syntax match juliaConstNum0506 display "\%(\<\%(eu\?\|eulergamma\|γ\|catalan\|φ\|golden\)\>\)"
syntax match juliaConstNum06 display "\%(\<\%(eu\?\|eulergamma\|γ\|catalan\|φ\|golden\)\>\)"
" Note: recognition of , which Vim does not consider a valid identifier, is
" complicated. We detect possible uses by just looking for the character (for
" performance) and then check that it's actually used by its own.
@@ -262,12 +240,12 @@ syntax match juliaPossibleEuler "" contains=juliaEuler
exec 'syntax match juliaEuler contained "\%(\%(^\|[' . s:nonidS_chars . ']\|' . s:operators . '\)\%([.0-9eEf_]*\d\)\?\)\@'.s:d(80).'<=\ze\%($\|[' . s:nonidS_chars . ']\|' . s:operators . '\)"'
syntax match juliaConstBool display "\<\%(true\|false\)\>"
syntax match juliaConstEnv display "\<\%(ARGS\|ENV\|OS_NAME\|ENDIAN_BOM\|LOAD_PATH\|VERSION\|JULIA_HOME\|PROGRAM_FILE\)\>"
syntax match juliaConstEnv07 display "\<DEPOT_PATH\>"
syntax match juliaConstIO0506 display "\<\%(STD\%(OUT\|IN\|ERR\)\|DevNull\)\>"
syntax match juliaConstIO07 display "\<\%(std\%(out\|in\|err\)\|devnull\)\>"
syntax match juliaConstEnv1011 display "\<DEPOT_PATH\>"
syntax match juliaConstIO06 display "\<\%(STD\%(OUT\|IN\|ERR\)\|DevNull\)\>"
syntax match juliaConstIO1011 display "\<\%(std\%(out\|in\|err\)\|devnull\)\>"
syntax match juliaConstC display "\<\%(WORD_SIZE\|C_NULL\)\>"
syntax match juliaConstGeneric display "\<\%(nothing\|Main\)\>"
syntax match juliaConstGeneric07 display "\<missing\>"
syntax match juliaConstGeneric1011 display "\<\%(undef\|missing\)\>"
syntax match juliaPossibleMacro transparent "@" contains=juliaMacroCall,juliaMacroCallP,juliaPrintfMacro
@@ -335,13 +313,20 @@ syntax match juliaChar display "'\\U\x\{1,8\}'" contains=juliaUniCharLarge
exec 'syntax match juliaCTransOperator "[[:space:]}' . s:nonid_chars . s:uniop_chars . s:binop_chars . '!?]\@'.s:d(1).'<!\.\?' . "'" . '"'
" TODO: some of these might be specialized; the rest could be just left to the
" generic juliaStringPrefixed fallback
syntax region juliaString matchgroup=juliaStringDelim start=+\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckStrings
exec 'syntax region juliaStringPrefixed matchgroup=juliaStringDelim start=+\<' . s:idregex . '\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw'
syntax region juliabString matchgroup=juliaStringDelim start=+\<b\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
syntax region juliasString matchgroup=juliaStringDelim start=+\<s\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
syntax region juliavString matchgroup=juliaStringDelim start=+\<v\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+
syntax region juliaipString matchgroup=juliaStringDelim start=+\<ip\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+
syntax region juliabigString matchgroup=juliaStringDelim start=+\<big\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+
syntax region juliavString matchgroup=juliaStringDelim start=+\<v\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
syntax region juliaipString matchgroup=juliaStringDelim start=+\<ip\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
syntax region juliabigString matchgroup=juliaStringDelim start=+\<big\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
syntax region juliaMIMEString matchgroup=juliaStringDelim start=+\<MIME\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialChars
syntax region juliarawString matchgroup=juliaStringDelim start=+\<raw\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
syntax region juliatextString matchgroup=juliaStringDelim start=+\<text\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
syntax region juliahtmlString matchgroup=juliaStringDelim start=+\<html\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
syntax region juliaint128String matchgroup=juliaStringDelim start=+\<u\?int128\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw
syntax region juliaDocString matchgroup=juliaStringDelim start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings
@@ -367,6 +352,9 @@ syntax match juliaOctalEscapeChar display contained "\\\o\{3\}"
syntax match juliaHexEscapeChar display contained "\\x\x\{2\}"
syntax match juliaUniCharSmall display contained "\\u\x\{1,4\}"
syntax match juliaUniCharLarge display contained "\\U\x\{1,8\}"
syntax cluster juliaSpecialCharsRaw contains=juliaDoubleBackslash,juliaEscapedQuote
syntax match juliaDoubleBackslash display contained "\\\\"
syntax match juliaEscapedQuote display contained "\\\""
syntax cluster juliaPrintfChars contains=juliaErrorPrintfFmt,juliaPrintfFmt
syntax match juliaErrorPrintfFmt display contained "\\\?%."
@@ -422,11 +410,12 @@ hi def link juliaKeyword Keyword
hi def link juliaInfixKeyword Keyword
hi def link juliaRepKeyword Keyword
hi def link juliaBlKeyword Keyword
exec 'hi! def link juliaBlKeyword06 ' . (b:julia_syntax_version == 6 ? 'Keyword' : b:julia_syntax_version == 10 ? 'juliaDeprecated' : 'NONE')
hi def link juliaConditional Conditional
hi def link juliaRepeat Repeat
hi def link juliaException Exception
hi def link juliaTypedef Keyword
exec 'hi! def link juliaOuter ' . (b:julia_syntax_version >= 7 ? 'Keyword' : 'NONE')
exec 'hi! def link juliaOuter ' . (b:julia_syntax_version >= 10 ? 'Keyword' : 'NONE')
hi def link juliaBaseTypeBasic Type
hi def link juliaBaseTypeNum Type
hi def link juliaBaseTypeC Type
@@ -448,21 +437,13 @@ hi def link juliaBaseTypeRandom Type
hi def link juliaBaseTypeDisplay Type
hi def link juliaBaseTypeTime Type
hi def link juliaBaseTypeOther Type
for t in ["Basic", "Array", "Set", "Range", "Time", "Process"]
let h = b:julia_syntax_version >= 6 ? "Type" : "NONE"
exec "hi! def link juliaBaseType" . t . "0607 " . h
endfor
for t in ["Iter", "Range"]
let h = b:julia_syntax_version == 5 ? "Type" : b:julia_syntax_version == 6 ? "juliaDeprecated" : "NONE"
exec "hi! def link juliaBaseType" . t . "05 " . h
endfor
for t in ["Num", "Range", "Dict", "Set"]
let h = b:julia_syntax_version <= 6 ? "Type" : "juliaDeprecated"
exec "hi! def link juliaBaseType" . t . "0506 " . h
let h = b:julia_syntax_version == 6 ? "Type" : b:julia_syntax_version == 10 ? "juliaDeprecated" : "NONE"
exec "hi! def link juliaBaseType" . t . "06 " . h
endfor
for t in ["Range", "Dict", "Set", "Basic", "C", "Array", "Iter", "Display", "IO", "Num", "Error"]
let h = b:julia_syntax_version >= 7 ? "Type" : "NONE"
exec "hi! def link juliaBaseType" . t . "07 " . h
for t in ["Range", "Dict", "Set", "Basic", "C", "Array", "Iter", "Display", "IO", "Num", "Error", "String"]
let h = b:julia_syntax_version >= 10 ? "Type" : "NONE"
exec "hi! def link juliaBaseType" . t . "1011 " . h
endfor
" NOTE: deprecated constants are not highlighted as such. For once,
@@ -470,9 +451,9 @@ endfor
" Plus, one-letter variables like `e` and `γ` can be used with other
" meanings.
hi def link juliaConstNum Constant
let h = b:julia_syntax_version <= 6 ? "Constant" : "NONE"
exec "hi! def link juliaConstNum0506 " . h
let h = b:julia_syntax_version >= 7 ? "Constant" : "NONE"
let h = b:julia_syntax_version == 6 ? "Constant" : "NONE"
exec "hi! def link juliaConstNum06 " . h
let h = b:julia_syntax_version >= 10 ? "Constant" : "NONE"
exec "hi! def link juliaEuler " . h
hi def link juliaConstEnv Constant
@@ -483,11 +464,11 @@ hi def link juliaRangeEnd Constant
hi def link juliaConstBool Boolean
for t in ["Generic", "IO", "Env"]
let h = b:julia_syntax_version >= 7 ? "Constant" : "NONE"
exec "hi! def link juliaConst" . t . "07 " . h
let h = b:julia_syntax_version >= 10 ? "Constant" : "NONE"
exec "hi! def link juliaConst" . t . "1011 " . h
endfor
let h = b:julia_syntax_version < 7 ? "Constant" : "juliaDeprecated"
exec "hi! def link juliaConstIO0506 " . h
let h = b:julia_syntax_version == 6 ? "Constant" : b:julia_syntax_version == 10 ? "juliaDeprecated" : "NONE"
exec "hi! def link juliaConstIO06 " . h
hi def link juliaComprehensionFor Keyword
hi def link juliaComprehensionIf Keyword
@@ -509,6 +490,7 @@ hi def link juliaComplexUnit Constant
hi def link juliaChar Character
hi def link juliaString String
hi def link juliaStringPrefixed String
hi def link juliabString String
hi def link juliasString String
hi def link juliavString String
@@ -516,6 +498,10 @@ hi def link juliarString String
hi def link juliaipString String
hi def link juliabigString String
hi def link juliaMIMEString String
hi def link juliarawString String
hi def link juliatestString String
hi def link juliahtmlString String
hi def link juliaint128String String
hi def link juliaPrintfString String
hi def link juliaShellString String
hi def link juliaDocString String
@@ -530,6 +516,8 @@ hi def link juliaOctalEscapeChar SpecialChar
hi def link juliaHexEscapeChar SpecialChar
hi def link juliaUniCharSmall SpecialChar
hi def link juliaUniCharLarge SpecialChar
hi def link juliaDoubleBackslash SpecialChar
hi def link juliaEscapedQuote SpecialChar
hi def link juliaPrintfFmt SpecialChar

69
syntax/juliadoc.vim Normal file
View File

@@ -0,0 +1,69 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1
" Vim syntax file for julia document view
scriptencoding utf-8
if exists('b:current_syntax')
finish
endif
syntax sync fromstart
syntax region juliadocCode matchgroup=juliadocCodeDelimiter start="`" end="`" concealends display oneline
syntax region juliadocCode matchgroup=juliadocCodeDelimiter start="``" end="``" concealends display oneline contains=juliadocCodeLatex
syntax region juliadocCode matchgroup=juliadocCodeDelimiter start="^\s*```.*$" end='^\s*```' concealends
syntax region juliadocH1 matchgroup=juliadocHeadingDelimiter start="##\@!" end="$" concealends display oneline
syntax region juliadocH2 matchgroup=juliadocHeadingDelimiter start="###\@!" end="$" concealends display oneline
syntax region juliadocH3 matchgroup=juliadocHeadingDelimiter start="####\@!" end="$" concealends display oneline
syntax region juliadocH4 matchgroup=juliadocHeadingDelimiter start="#####\@!" end="$" concealends display oneline
syntax region juliadocH5 matchgroup=juliadocHeadingDelimiter start="######\@!" end="$" concealends display oneline
syntax region juliadocH6 matchgroup=juliadocHeadingDelimiter start="#######\@!" end="$" concealends display oneline
syntax match juliadocLink "\[\^\@!.\{-1,}\](.\{-1,})" contains=juliadocLinkBody,juliadocLinkUrl display keepend
syntax region juliadocLinkBody matchgroup=juliadocLinkDelimiter start="\[" end="\]" concealends display contained oneline
syntax match juliadocLinkUrl "(\zs@ref\s\+.\{-1,}\ze)" contains=juliadocLinkUrlConceal display keepend
syntax match juliadocLinkUrlConceal "@ref\s\+" conceal display contained
syntax match juliadocCrossref "\[`.\{-1,}`\](@ref)" contains=juliadocCrossrefBody display keepend
syntax region juliadocCrossrefBody matchgroup=juliadocCrossrefDelimiter start="\[`" end="`\](@ref)" concealends display contained oneline
syntax region juliadocMath matchgroup=juliadocMathDelimiter start="\$" end="\$" concealends display oneline
syntax match juliadocListing "^\s*\zs\%([-+*]\|\d\+[.)]\)\ze\s" display
syntax match juliadocFootnote "^\s*\[\^[[:alnum:]]\+\]:\s*" display contains=juliadocFootnoteBody keepend
syntax region juliadocFootnoteBody matchgroup=juliadocFootnoteDelimiter start="^\s*\zs\[\^" end="\]" concealends display contained oneline
syntax match juliadocFootnoteRef "\s\[\^[[:alnum:]]\+\]" display contains=juliadocFootnoteRefBody,juliadocFootnoteRefConceal keepend
syntax match juliadocFootnoteRefBody "[[:alnum:]]\+" display contained
syntax match juliadocFootnoteRefConceal "\^" conceal display contained
syntax region juliadocBlockquote matchgroup=juliadocBlockquoteDelimiter start="^\s*>\s" end="$" concealends display oneline
syntax match juliadocRules "^-\{3,}" display
syntax region juliadocAdmonitions matchgroup=juliadocAdmonitionsDelimiter start="^\s*!!!" end="$" concealends display contains=juliadocAdmonitionsType,juliadocAdmonitionsTitle oneline keepend
syntax match juliadocAdmonitionsType "\c\%(danger\|warning\|info\|note\|tip\)\>" display contained
syntax region juliadocAdmonitionsTitle matchgroup=juliadocAdmonitionsTitleDelimiter start='"' end='"' display contained oneline
if &encoding ==# 'utf-8'
for [s:from, s:to] in items(julia_latex_symbols#get_dict())
execute printf('syntax match juliadocCodeLatex "\\%s" conceal cchar=%s display contained', escape(s:from, '~"\.^$[]*'), s:to)
endfor
endif
highlight default link juliadocCode String
highlight default link juliadocCodeLatex String
highlight default link juliadocH1 Title
highlight default link juliadocH2 Title
highlight default link juliadocH3 Title
highlight default link juliadocH4 Title
highlight default link juliadocH5 Title
highlight default link juliadocH6 Title
highlight default link juliadocLinkBody Identifier
highlight default link juliadocLinkUrl Underlined
highlight default link juliadocCrossref Underlined
highlight default link juliadocCrossrefBody Underlined
highlight default link juliadocMath Special
highlight default link juliadocListing PreProc
highlight default link juliadocFootnoteBody PreProc
highlight default link juliadocFootnoteRefBody PreProc
highlight default link juliadocBlockquote Comment
highlight default link juliadocRules PreProc
highlight default link juliadocAdmonitionsType Todo
highlight default link juliadocAdmonitionsTitle Title
let b:current_syntax = "juliadoc"
endif

View File

@@ -84,25 +84,25 @@ syn region mkdLinkTitle matchgroup=mkdDelimiter start=+'+ end=+'+ contained
syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+ end=+)+ contained
"HTML headings
syn region htmlH1 start="^\s*#" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH2 start="^\s*##" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH3 start="^\s*###" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH4 start="^\s*####" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH5 start="^\s*#####" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH6 start="^\s*######" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH1 matchgroup=mkdHeading start="^\s*#" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH2 matchgroup=mkdHeading start="^\s*##" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH3 matchgroup=mkdHeading start="^\s*###" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH4 matchgroup=mkdHeading start="^\s*####" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH5 matchgroup=mkdHeading start="^\s*#####" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn region htmlH6 matchgroup=mkdHeading start="^\s*######" end="$" contains=mkdLink,mkdInlineURL,@Spell
syn match htmlH1 /^.\+\n=\+$/ contains=mkdLink,mkdInlineURL,@Spell
syn match htmlH2 /^.\+\n-\+$/ contains=mkdLink,mkdInlineURL,@Spell
"define Markdown groups
syn match mkdLineBreak / \+$/
syn region mkdBlockquote start=/^\s*>/ end=/$/ contains=mkdLink,mkdInlineURL,mkdLineBreak,@Spell
syn region mkdCode start=/\(\([^\\]\|^\)\\\)\@<!`/ end=/\(\([^\\]\|^\)\\\)\@<!`/
syn region mkdCode start=/\s*``[^`]*/ end=/[^`]*``\s*/
syn region mkdCode start=/^\s*\z(`\{3,}\)[^`]*$/ end=/^\s*\z1`*\s*$/
syn region mkdCode start=/\s*\~\~[^\~]*/ end=/[^\~]*\~\~\s*/
syn region mkdCode start=/^\s*\z(\~\{3,}\)\s*[0-9A-Za-z_+-]*\s*$/ end=/^\s*\z1\~*\s*$/
syn region mkdCode start="<pre[^>]*\\\@<!>" end="</pre>"
syn region mkdCode start="<code[^>]*\\\@<!>" end="</code>"
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!`/ end=/\(\([^\\]\|^\)\\\)\@<!`/' . s:concealends
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!``/ skip=/[^`]`[^`]/ end=/\(\([^\\]\|^\)\\\)\@<!``/' . s:concealends
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/^\s*\z(`\{3,}\)[^`]*$/ end=/^\s*\z1`*\s*$/' . s:concealends
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!\~\~/ end=/\(\([^\\]\|^\)\\\)\@<!\~\~/' . s:concealends
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/^\s*\z(\~\{3,}\)\s*[0-9A-Za-z_+-]*\s*$/ end=/^\s*\z1\~*\s*$/' . s:concealends
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="<pre[^>]*\\\@<!>" end="</pre>"' . s:concealends
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="<code[^>]*\\\@<!>" end="</code>"' . s:concealends
syn region mkdFootnote start="\[^" end="\]"
syn match mkdCode /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/
syn match mkdCode /\%^\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/
@@ -117,7 +117,7 @@ syn match mkdRule /^\s*_\s\{0,1}_\s\{0,1}_\(_\|\s\)*$/
" YAML frontmatter
if get(g:, 'vim_markdown_frontmatter', 0)
syn include @yamlTop syntax/yaml.vim
syn region Comment matchgroup=mkdDelimiter start="\%^---$" end="^---$" contains=@yamlTop keepend
syn region Comment matchgroup=mkdDelimiter start="\%^---$" end="^\(---\|...\)$" contains=@yamlTop keepend
unlet! b:current_syntax
endif
@@ -152,6 +152,7 @@ syn cluster mkdNonListItem contains=@htmlTop,htmlItalic,htmlBold,htmlBoldItalic,
"highlighting for Markdown groups
HtmlHiLink mkdString String
HtmlHiLink mkdCode String
HtmlHiLink mkdCodeDelimiter String
HtmlHiLink mkdCodeStart String
HtmlHiLink mkdCodeEnd String
HtmlHiLink mkdFootnote Comment

View File

@@ -43,7 +43,7 @@ endif
syntax match mustacheError '}}}\?'
syntax match mustacheInsideError '{{[{$#<>=!\/]\?'
syntax region mustacheInside start=/{{/ end=/}}}\?/ keepend containedin=TOP,@htmlMustacheContainer
syntax region mustacheInside start=/{{[^!]/ end=/}}}\?/ keepend containedin=TOP,@htmlMustacheContainer
syntax match mustacheOperators '=\|\.\|/' contained containedin=mustacheInside,@htmlMustacheContainer
syntax region mustacheSection start='{{[$#^/]'lc=2 end=/}}/me=e-2 contained containedin=mustacheInside,@htmlMustacheContainer
syntax region mustachePartial start=/{{[<>]/lc=2 end=/}}/me=e-2 contained containedin=mustacheInside,@htmlMustacheContainer
@@ -52,8 +52,8 @@ syntax match mustacheHandlebars '{{\|}}' contained containedin=mustacheInside,@h
syntax match mustacheUnescape '{{{\|}}}' contained containedin=mustacheInside,@htmlMustacheContainer
syntax match mustacheConditionals '\([/#]\(if\|unless\)\|else\)' contained containedin=mustacheInside
syntax match mustacheHelpers '[/#]\(with\|each\)' contained containedin=mustacheSection
syntax region mustacheComment start=/{{!/rs=s+2 skip=/{{.\{-}}}/ end=/}}/re=e-2 contains=Todo contained containedin=mustacheInside,@htmlMustacheContainer
syntax region mustacheBlockComment start=/{{!--/rs=s+2 skip=/{{.\{-}}}/ end=/--}}/re=e-2 contains=Todo contained extend containedin=mustacheInside,@htmlMustacheContainer
syntax region mustacheComment start=/{{!/rs=s+2 skip=/{{.\{-}}}/ end=/}}/re=e-2 contains=Todo contained containedin=TOP,mustacheInside,@htmlMustacheContainer
syntax region mustacheBlockComment start=/{{!--/rs=s+2 skip=/{{.\{-}}}/ end=/--}}/re=e-2 contains=Todo contained extend containedin=TOP,mustacheInside,@htmlMustacheContainer
syntax region mustacheQString start=/'/ skip=/\\'/ end=/'/ contained containedin=mustacheInside
syntax region mustacheDQString start=/"/ skip=/\\"/ end=/"/ contained containedin=mustacheInside

View File

@@ -36,12 +36,15 @@ syn region nixComment start=+/\*+ end=+\*/+ contains=nixTodo,@Spell
syn region nixInterpolation matchgroup=nixInterpolationDelimiter start="\${" end="}" contained contains=@nixExpr,nixInterpolationParam
syn match nixSimpleStringSpecial /\\./ contained
syn match nixSimpleStringSpecial /\\\%([nrt"\\$]\|$\)/ contained
syn match nixStringSpecial /''['$]/ contained
syn match nixStringSpecial /''\\./ contained
syn match nixStringSpecial /''\\[nrt]/ contained
syn region nixSimpleString matchgroup=nixStringDelimiter start=+"+ skip=+\\"+ end=+"+ contains=nixInterpolation,nixSimpleStringSpecial
syn region nixString matchgroup=nixStringDelimiter start=+''+ skip=+''['$\\]+ end=+''+ contains=nixInterpolation,nixStringSpecial
syn match nixInvalidSimpleStringEscape /\\[^nrt"\\$]/ contained
syn match nixInvalidStringEscape /''\\[^nrt]/ contained
syn region nixSimpleString matchgroup=nixStringDelimiter start=+"+ skip=+\\"+ end=+"+ contains=nixInterpolation,nixSimpleStringSpecial,nixInvalidSimpleStringEscape
syn region nixString matchgroup=nixStringDelimiter start=+''+ skip=+''['$\\]+ end=+''+ contains=nixInterpolation,nixStringSpecial,nixInvalidStringEscape
syn match nixFunctionCall "[a-zA-Z_][a-zA-Z0-9_'-]*"
@@ -53,7 +56,7 @@ syn match nixSearchPathRef "<[a-zA-Z0-9._+-]\+\%(\/[a-zA-Z0-9._+-]\+\)*>" contai
syn match nixURI "[a-zA-Z][a-zA-Z0-9.+-]*:[a-zA-Z0-9%/?:@&=$,_.!~*'+-]\+"
syn match nixAttributeDot "\." contained
syn match nixAttribute "[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%([^a-zA-Z0-9_'-.]\|$\)" contained
syn match nixAttribute "[a-zA-Z_][a-zA-Z0-9_'-]*\ze\%([^a-zA-Z0-9_'.-]\|$\)" contained
syn region nixAttributeAssignment start="=" end="\ze;" contained contains=@nixExpr
syn region nixAttributeDefinition start=/\ze[a-zA-Z_"$]/ end=";" contained contains=nixComment,nixAttribute,nixInterpolation,nixSimpleString,nixAttributeDot,nixAttributeAssignment
@@ -149,41 +152,43 @@ syn keyword nixNamespacedBuiltin contained
syn match nixBuiltin "builtins\.[a-zA-Z']\+"he=s+9 contains=nixComment,nixNamespacedBuiltin
hi def link nixArgOperator Operator
hi def link nixArgumentDefinition Identifier
hi def link nixArgumentEllipsis Operator
hi def link nixAssertKeyword Keyword
hi def link nixAttribute Identifier
hi def link nixAttributeDot Operator
hi def link nixBoolean Boolean
hi def link nixBuiltin Special
hi def link nixComment Comment
hi def link nixConditional Conditional
hi def link nixHomePath Include
hi def link nixIfExprKeyword Keyword
hi def link nixInherit Keyword
hi def link nixInteger Integer
hi def link nixInterpolation Macro
hi def link nixInterpolationDelimiter Delimiter
hi def link nixInterpolationParam Macro
hi def link nixLetExprKeyword Keyword
hi def link nixNamespacedBuiltin Special
hi def link nixNull Constant
hi def link nixOperator Operator
hi def link nixPath Include
hi def link nixPathDelimiter Delimiter
hi def link nixRecKeyword Keyword
hi def link nixSearchPath Include
hi def link nixSimpleBuiltin Keyword
hi def link nixSimpleFunctionArgument Identifier
hi def link nixSimpleString String
hi def link nixSimpleStringSpecial SpecialChar
hi def link nixString String
hi def link nixStringDelimiter Delimiter
hi def link nixStringSpecial Special
hi def link nixTodo Todo
hi def link nixURI Include
hi def link nixWithExprKeyword Keyword
hi def link nixArgOperator Operator
hi def link nixArgumentDefinition Identifier
hi def link nixArgumentEllipsis Operator
hi def link nixAssertKeyword Keyword
hi def link nixAttribute Identifier
hi def link nixAttributeDot Operator
hi def link nixBoolean Boolean
hi def link nixBuiltin Special
hi def link nixComment Comment
hi def link nixConditional Conditional
hi def link nixHomePath Include
hi def link nixIfExprKeyword Keyword
hi def link nixInherit Keyword
hi def link nixInteger Integer
hi def link nixInterpolation Macro
hi def link nixInterpolationDelimiter Delimiter
hi def link nixInterpolationParam Macro
hi def link nixInvalidSimpleStringEscape Error
hi def link nixInvalidStringEscape Error
hi def link nixLetExprKeyword Keyword
hi def link nixNamespacedBuiltin Special
hi def link nixNull Constant
hi def link nixOperator Operator
hi def link nixPath Include
hi def link nixPathDelimiter Delimiter
hi def link nixRecKeyword Keyword
hi def link nixSearchPath Include
hi def link nixSimpleBuiltin Keyword
hi def link nixSimpleFunctionArgument Identifier
hi def link nixSimpleString String
hi def link nixSimpleStringSpecial SpecialChar
hi def link nixString String
hi def link nixStringDelimiter Delimiter
hi def link nixStringSpecial Special
hi def link nixTodo Todo
hi def link nixURI Include
hi def link nixWithExprKeyword Keyword
" This could lead up to slow syntax highlighting for large files, but usually
" large files such as all-packages.nix are one large attribute set, so if we'd

View File

@@ -57,7 +57,7 @@ syn match pugPlainChar "\\" contained
syn region pugInterpolation matchgroup=pugInterpolationDelimiter start="[#!]{" end="}" contains=@htmlJavascript
syn match pugInterpolationEscape "\\\@<!\%(\\\\\)*\\\%(\\\ze#{\|#\ze{\)"
syn match pugTagInlineText "\s.*$" contained contains=pugInterpolation,pugTextInlinePug,@Spell
syn region pugPipedText matchgroup=pugPipeChar start="|" end="$" contained contains=pugInterpolation,pugTextInlinePug nextgroup=pugPipedText skipnl
syn region pugPipedText matchgroup=pugPipeChar start="|" end="$" contained contains=pugInterpolation,pugTextInlinePug,@Spell nextgroup=pugPipedText skipnl
syn match pugTagBlockChar "\.$" contained nextgroup=pugTagBlockText,pugTagBlockEnd skipnl
syn region pugTagBlockText start="\%(\s*\)\S" end="\ze\n" contained contains=pugInterpolation,pugTextInlinePug,@Spell nextgroup=pugTagBlockText,pugTagBlockEnd skipnl
syn region pugTagBlockEnd start="\s*\S" end="$" contained contains=pugInterpolation,pugTextInlinePug nextgroup=pugBegin skipnl

View File

@@ -35,8 +35,8 @@ syn match qmlLineComment "\/\/.*" contains=@Spell,qmlCommentTodo
syn match qmlCommentSkip "^[ \t]*\*\($\|[ \t]\+\)"
syn region qmlComment start="/\*" end="\*/" contains=@Spell,qmlCommentTodo fold
syn match qmlSpecial "\\\d\d\d\|\\."
syn region qmlStringD start=+"+ skip=+\\\\\|\\"\|\\$+ end=+"\|$+ contains=qmlSpecial,@htmlPreproc,@Spell
syn region qmlStringS start=+'+ skip=+\\\\\|\\'\|\\$+ end=+'\|$+ contains=qmlSpecial,@htmlPreproc,@Spell
syn region qmlStringD start=+"+ skip=+\\\\\|\\"\|\\$+ end=+"+ keepend contains=qmlSpecial,@htmlPreproc,@Spell
syn region qmlStringS start=+'+ skip=+\\\\\|\\'\|\\$+ end=+'+ keepend contains=qmlSpecial,@htmlPreproc,@Spell
syn match qmlCharacter "'\\.'"
syn match qmlNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"

View File

@@ -206,11 +206,6 @@ syn region rustCommentBlockNest matchgroup=rustCommentBlock star
syn region rustCommentBlockDocNest matchgroup=rustCommentBlockDoc start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNest,@Spell contained transparent
syn region rustCommentBlockDocNestError matchgroup=rustCommentBlockDocError start="/\*" end="\*/" contains=rustTodo,rustCommentBlockDocNestError,@Spell contained transparent
if exists("b:current_syntax_embed")
syn match rustCommentLine "^//"
syn match rustCommentLineDoc "^//\%(//\@!\|!\)"
endif
" FIXME: this is a really ugly and not fully correct implementation. Most
" importantly, a case like ``/* */*`` should have the final ``*`` not being in
" a comment, but in practice at present it leaves comments open two levels
@@ -235,12 +230,18 @@ if !exists("b:current_syntax_embed")
syntax include @RustCodeInComment <sfile>:p:h/rust.vim
unlet b:current_syntax_embed
" Currently regions marked as ```<some-other-syntax> will not get
" highlighted at all. In the future, we can do as vim-markdown does and
" highlight with the other syntax. But for now, let's make sure we find
" the closing block marker, because the rules below won't catch it.
syn region rustCommentLinesDocNonRustCode matchgroup=rustCommentDocCodeFence start='^\z(\s*//[!/]\s*```\).\+$' end='^\z1$' keepend contains=rustCommentLineDoc
" We borrow the rules from rusts src/librustdoc/html/markdown.rs, so that
" we only highlight as Rust what it would perceive as Rust (almost; its
" possible to trick it if you try hard, and indented code blocks arent
" supported because Markdown is a menace to parse and only mad dogs and
" Englishmen would try to handle that case correctly in this syntax file).
syn region rustCommentLinesDocRustCode matchgroup=rustCommentDocCodeFence start='^\z(\s*//[!/]\s*```\)[^A-Za-z0-9_-]*\%(\%(should_panic\|no_run\|ignore\|allow_fail\|rust\|test_harness\|compile_fail\|E\d\{4}\)\%([^A-Za-z0-9_-]\+\|$\)\)*$' end='^\z1$' keepend contains=@RustCodeInComment
syn region rustCommentLinesDocRustCode matchgroup=rustCommentDocCodeFence start='^\z(\s*//[!/]\s*```\)[^A-Za-z0-9_-]*\%(\%(should_panic\|no_run\|ignore\|allow_fail\|rust\|test_harness\|compile_fail\|E\d\{4}\)\%([^A-Za-z0-9_-]\+\|$\)\)*$' end='^\z1$' keepend contains=@RustCodeInComment,rustCommentLineDocLeader
syn region rustCommentBlockDocRustCode matchgroup=rustCommentDocCodeFence start='^\z(\%(\s*\*\)\?\s*```\)[^A-Za-z0-9_-]*\%(\%(should_panic\|no_run\|ignore\|allow_fail\|rust\|test_harness\|compile_fail\|E\d\{4}\)\%([^A-Za-z0-9_-]\+\|$\)\)*$' end='^\z1$' keepend contains=@RustCodeInComment,rustCommentBlockDocStar
" Strictly, this may or may not be correct; this code, for example, would
" mishighlight:
@@ -254,6 +255,7 @@ if !exists("b:current_syntax_embed")
"
" … but I dont care. Balance of probability, and all that.
syn match rustCommentBlockDocStar /^\s*\*\s\?/ contained
syn match rustCommentLineDocLeader "^\s*//\%(//\@!\|!\)" contained
endif
" Default highlighting {{{1
@@ -308,6 +310,7 @@ hi def link rustFuncCall Function
hi def link rustShebang Comment
hi def link rustCommentLine Comment
hi def link rustCommentLineDoc SpecialComment
hi def link rustCommentLineDocLeader rustCommentLineDoc
hi def link rustCommentLineDocError Error
hi def link rustCommentBlock rustCommentLine
hi def link rustCommentBlockDoc rustCommentLineDoc

View File

@@ -195,6 +195,7 @@ syntax keyword swiftAttributes
\ @IBDesignable
\ @IBInspectable
\ @IBOutlet
\ @inlinable
\ @noescape
\ @nonobjc
\ @noreturn
@@ -204,6 +205,7 @@ syntax keyword swiftAttributes
\ @objc
\ @testable
\ @UIApplicationMain
\ @usableFromInline
\ @warn_unused_result
syntax keyword swiftConditionStatement #available

View File

@@ -27,12 +27,16 @@ syn region tomlString oneline start=/'/ end=/'/
syn region tomlString start=/'''/ end=/'''/
hi def link tomlString String
syn match tomlInteger /\<[+-]\=[0-9]\(_\=\d\)*\>/ display
syn match tomlInteger /\<[+-]\=\(inf\|nan\)\>/ display
syn match tomlInteger /[+-]\=\<[1-9]\(_\=\d\)*\>/ display
syn match tomlInteger /[+-]\=\<0\>/ display
syn match tomlInteger /[+-]\=\<0x[[:xdigit:]]\(_\=[[:xdigit:]]\)*\>/ display
syn match tomlInteger /[+-]\=\<0o[0-7]\(_\=[0-7]\)*\>/ display
syn match tomlInteger /[+-]\=\<0b[01]\(_\=[01]\)*\>/ display
syn match tomlInteger /[+-]\=\<\(inf\|nan\)\>/ display
hi def link tomlInteger Number
syn match tomlFloat /\<[+-]\=[0-9]\(_\=\d\)*\.\d\+\>/ display
syn match tomlFloat /\<[+-]\=[0-9]\(_\=\d\)*\(\.[0-9]\(_\=\d\)*\)\=[eE][+-]\=[0-9]\(_\=\d\)*\>/ display
syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\.\d\+\>/ display
syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\(\.\d\(_\=\d\)*\)\=[eE][+-]\=\d\(_\=\d\)*\>/ display
hi def link tomlFloat Float
syn match tomlBoolean /\<\%(true\|false\)\>/ display

View File

@@ -58,7 +58,7 @@ endif "" JSDoc end
syntax case match
"" Syntax in the typescript code"{{{
syn match typescriptSpecial "\\\d\d\d\|\\."
syn match typescriptSpecial "\\\d\d\d\|\\x\x\{2\}\|\\u\x\{4\}" contained containedin=typescriptStringD,typescriptStringS,typescriptStringB display
syn region typescriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=typescriptSpecial,@htmlPreproc extend
syn region typescriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=typescriptSpecial,@htmlPreproc extend
syn region typescriptStringB start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=typescriptInterpolation,typescriptSpecial,@htmlPreproc extend
@@ -87,28 +87,31 @@ syntax keyword typescriptPrototype contained prototype
"}}}
" DOM, Browser and Ajax Support {{{
""""""""""""""""""""""""
syntax keyword typescriptBrowserObjects window navigator screen history location
syntax keyword typescriptDOMObjects document event HTMLElement Anchor Area Base Body Button Form Frame Frameset Image Link Meta Option Select Style Table TableCell TableRow Textarea
syntax keyword typescriptDOMMethods contained createTextNode createElement insertBefore replaceChild removeChild appendChild hasChildNodes cloneNode normalize isSupported hasAttributes getAttribute setAttribute removeAttribute getAttributeNode setAttributeNode removeAttributeNode getElementsByTagName hasAttribute getElementById adoptNode close compareDocumentPosition createAttribute createCDATASection createComment createDocumentFragment createElementNS createEvent createExpression createNSResolver createProcessingInstruction createRange createTreeWalker elementFromPoint evaluate getBoxObjectFor getElementsByClassName getSelection getUserData hasFocus importNode
syntax keyword typescriptDOMProperties contained nodeName nodeValue nodeType parentNode childNodes firstChild lastChild previousSibling nextSibling attributes ownerDocument namespaceURI prefix localName tagName
syntax keyword typescriptAjaxObjects XMLHttpRequest
syntax keyword typescriptAjaxProperties contained readyState responseText responseXML statusText
syntax keyword typescriptAjaxMethods contained onreadystatechange abort getAllResponseHeaders getResponseHeader open send setRequestHeader
syntax keyword typescriptPropietaryObjects ActiveXObject
syntax keyword typescriptPropietaryMethods contained attachEvent detachEvent cancelBubble returnValue
syntax keyword typescriptHtmlElemProperties contained className clientHeight clientLeft clientTop clientWidth dir href id innerHTML lang length offsetHeight offsetLeft offsetParent offsetTop offsetWidth scrollHeight scrollLeft scrollTop scrollWidth style tabIndex target title
syntax keyword typescriptEventListenerKeywords contained blur click focus mouseover mouseout load item
syntax keyword typescriptEventListenerMethods contained scrollIntoView addEventListener dispatchEvent removeEventListener preventDefault stopPropagation
if get(g:, 'typescript_ignore_browserwords', 0)
syntax keyword typescriptBrowserObjects window navigator screen history location
syntax keyword typescriptDOMObjects document event HTMLElement Anchor Area Base Body Button Form Frame Frameset Image Link Meta Option Select Style Table TableCell TableRow Textarea
syntax keyword typescriptDOMMethods contained createTextNode createElement insertBefore replaceChild removeChild appendChild hasChildNodes cloneNode normalize isSupported hasAttributes getAttribute setAttribute removeAttribute getAttributeNode setAttributeNode removeAttributeNode getElementsByTagName hasAttribute getElementById adoptNode close compareDocumentPosition createAttribute createCDATASection createComment createDocumentFragment createElementNS createEvent createExpression createNSResolver createProcessingInstruction createRange createTreeWalker elementFromPoint evaluate getBoxObjectFor getElementsByClassName getSelection getUserData hasFocus importNode
syntax keyword typescriptDOMProperties contained nodeName nodeValue nodeType parentNode childNodes firstChild lastChild previousSibling nextSibling attributes ownerDocument namespaceURI prefix localName tagName
syntax keyword typescriptAjaxObjects XMLHttpRequest
syntax keyword typescriptAjaxProperties contained readyState responseText responseXML statusText
syntax keyword typescriptAjaxMethods contained onreadystatechange abort getAllResponseHeaders getResponseHeader open send setRequestHeader
syntax keyword typescriptPropietaryObjects ActiveXObject
syntax keyword typescriptPropietaryMethods contained attachEvent detachEvent cancelBubble returnValue
syntax keyword typescriptHtmlElemProperties contained className clientHeight clientLeft clientTop clientWidth dir href id innerHTML lang length offsetHeight offsetLeft offsetParent offsetTop offsetWidth scrollHeight scrollLeft scrollTop scrollWidth style tabIndex target title
syntax keyword typescriptEventListenerKeywords contained blur click focus mouseover mouseout load item
syntax keyword typescriptEventListenerMethods contained scrollIntoView addEventListener dispatchEvent removeEventListener preventDefault stopPropagation
endif
" }}}
"" Programm Keywords"{{{
syntax keyword typescriptSource import export from as
syntax keyword typescriptIdentifier arguments this let var void const
syntax keyword typescriptIdentifier arguments this void
syntax keyword typescriptStorageClass let var const
syntax keyword typescriptOperator delete new instanceof typeof
syntax keyword typescriptBoolean true false
syntax keyword typescriptNull null undefined
@@ -137,7 +140,7 @@ syntax keyword typescriptReserved constructor declare as interface module abstra
syn match typescriptParameters "([a-zA-Z0-9_?.$][\w?.$]*)\s*:\s*([a-zA-Z0-9_?.$][\w?.$]*)" contained skipwhite
"}}}
" DOM2 Objects"{{{
syntax keyword typescriptType DOMImplementation DocumentFragment Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction void any string boolean number symbol never object
syntax keyword typescriptType DOMImplementation DocumentFragment Node NodeList NamedNodeMap CharacterData Attr Element Text Comment CDATASection DocumentType Notation Entity EntityReference ProcessingInstruction void any string boolean number symbol never object unknown
syntax keyword typescriptExceptions DOMException
"}}}
" DOM2 CONSTANT"{{{
@@ -187,7 +190,7 @@ syntax match typescriptDotNotation "\.style\." nextgroup=typescriptCssStyles
"" Code blocks
syntax cluster typescriptAll contains=typescriptComment,typescriptLineComment,typescriptDocComment,typescriptStringD,typescriptStringS,typescriptStringB,typescriptRegexpString,typescriptNumber,typescriptFloat,typescriptDecorators,typescriptLabel,typescriptSource,typescriptType,typescriptOperator,typescriptBoolean,typescriptNull,typescriptFuncKeyword,typescriptConditional,typescriptGlobal,typescriptRepeat,typescriptBranch,typescriptStatement,typescriptGlobalObjects,typescriptMessage,typescriptIdentifier,typescriptExceptions,typescriptReserved,typescriptDeprecated,typescriptDomErrNo,typescriptDomNodeConsts,typescriptHtmlEvents,typescriptDotNotation,typescriptBrowserObjects,typescriptDOMObjects,typescriptAjaxObjects,typescriptPropietaryObjects,typescriptDOMMethods,typescriptHtmlElemProperties,typescriptDOMProperties,typescriptEventListenerKeywords,typescriptEventListenerMethods,typescriptAjaxProperties,typescriptAjaxMethods,typescriptFuncArg
syntax cluster typescriptAll contains=typescriptComment,typescriptLineComment,typescriptDocComment,typescriptStringD,typescriptStringS,typescriptStringB,typescriptRegexpString,typescriptNumber,typescriptFloat,typescriptDecorators,typescriptLabel,typescriptSource,typescriptType,typescriptOperator,typescriptBoolean,typescriptNull,typescriptFuncKeyword,typescriptConditional,typescriptGlobal,typescriptRepeat,typescriptBranch,typescriptStatement,typescriptGlobalObjects,typescriptMessage,typescriptIdentifier,typescriptStorageClass,typescriptExceptions,typescriptReserved,typescriptDeprecated,typescriptDomErrNo,typescriptDomNodeConsts,typescriptHtmlEvents,typescriptDotNotation,typescriptBrowserObjects,typescriptDOMObjects,typescriptAjaxObjects,typescriptPropietaryObjects,typescriptDOMMethods,typescriptHtmlElemProperties,typescriptDOMProperties,typescriptEventListenerKeywords,typescriptEventListenerMethods,typescriptAjaxProperties,typescriptAjaxMethods,typescriptFuncArg
if main_syntax == "typescript"
syntax sync clear
@@ -263,6 +266,7 @@ if version >= 508 || !exists("did_typescript_syn_inits")
HiLink typescriptConditional Conditional
HiLink typescriptBranch Conditional
HiLink typescriptIdentifier Identifier
HiLink typescriptStorageClass StorageClass
HiLink typescriptRepeat Repeat
HiLink typescriptStatement Statement
HiLink typescriptFuncKeyword Function

View File

@@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1
" vifm syntax file
" Maintainer: xaizek <xaizek@posteo.net>
" Last Change: July 4, 2018
" Last Change: September 22, 2018
" Inspired By: Vim syntax file by Dr. Charles E. Campbell, Jr.
if exists('b:current_syntax')
@@ -19,11 +19,12 @@ syntax keyword vifmCommand contained alink apropos bmark bmarks bmgo change
\ chmod chown clone compare cope[n] co[py] cq[uit] d[elete] delbmarks
\ delm[arks] di[splay] dirs e[dit] el[se] empty en[dif] exi[t] file fin[d]
\ fini[sh] go[to] gr[ep] h[elp] histnext his[tory] histprev jobs locate ls
\ lstrash marks mes[sages] mkdir m[ove] noh[lsearch] on[ly] popd pushd pu[t]
\ pw[d] qa[ll] q[uit] redr[aw] reg[isters] rename restart restore rlink
\ screen sh[ell] siblnext siblprev sor[t] sp[lit] s[ubstitute] tabc[lose]
\ tabm[ove] tabname tabnew touch tr trashes tree sync undol[ist] ve[rsion]
\ vie[w] vifm vs[plit] winc[md] w[rite] wq wqa[ll] xa[ll] x[it] y[ank]
\ lstrash marks media mes[sages] mkdir m[ove] noh[lsearch] on[ly] popd pushd
\ pu[t] pw[d] qa[ll] q[uit] redr[aw] reg[isters] regular rename restart
\ restore rlink screen sh[ell] siblnext siblprev sor[t] sp[lit] s[ubstitute]
\ tabc[lose] tabm[ove] tabname tabnew touch tr trashes tree sync undol[ist]
\ ve[rsion] vie[w] vifm vs[plit] winc[md] w[rite] wq wqa[ll] xa[ll] x[it]
\ y[ank]
\ nextgroup=vifmArgs
" commands that might be prepended to a command without changing everything else
@@ -128,7 +129,7 @@ syntax keyword vifmOption contained aproposprg autochpos caseoptions cdpath cd
\ deleteprg dotdirs dotfiles dirsize fastrun fillchars fcs findprg
\ followlinks fusehome gdefault grepprg histcursor history hi hlsearch hls
\ iec ignorecase ic iooptions incsearch is laststatus lines locateprg ls
\ lsoptions lsview milleroptions millerview mintimeoutlen number nu
\ lsoptions lsview mediaprg milleroptions millerview mintimeoutlen number nu
\ numberwidth nuw previewprg quickview relativenumber rnu rulerformat ruf
\ runexec scrollbind scb scrolloff so sort sortgroups sortorder sortnumbers
\ shell sh shortmess shm showtabline stal sizefmt slowfs smartcase scs
@@ -383,11 +384,12 @@ syntax match vifmEnvVar contained /\$[0-9a-zA-Z_]\+/
syntax match vifmNumber contained /\d\+/
" Optional map arguments right after command name
syntax match vifmMapArgList '\(<silent>\s*\)*' contained nextgroup=vifmMapLhs
syntax match vifmMapArgList '\(<\(silent\|wait\)>\s*\)*' contained
\ nextgroup=vifmMapLhs
" Ange-bracket notation
syntax case ignore
syntax match vifmNotation '<\(esc\|cr\|space\|del\|nop\|\(s-\)\?tab\|home\|end\|left\|right\|up\|down\|bs\|delete\|insert\|pageup\|pagedown\|\([acms]-\)\?f\d\{1,2\}\|c-s-[a-z[\]^_]\|s-c-[a-z[\]^_]\|c-[a-z[\]^_]\|[am]-c-[a-z]\|c-[am]-[a-z]\|[am]-[a-z]\)>'
syntax match vifmNotation '<\(esc\|cr\|space\|del\|nop\|\(s-\)\?tab\|home\|end\|left\|right\|up\|down\|bs\|delete\|insert\|pageup\|pagedown\|\([acms]-\)\?f\d\{1,2\}\|c-s-[a-z[\]^_]\|s-c-[a-z[\]^_]\|c-[a-z[\]^_@]\|[am]-c-[a-z]\|c-[am]-[a-z]\|[am]-[a-z]\)>'
syntax case match
" Whole line comment