diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-07-25 15:42:07 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-25 15:42:07 +0100 |
commit | b529cfbd04c02e31cfa88f2c8d88b5ff532d4f7d (patch) | |
tree | dc432e1b5129a6cdddf67ae6468e72315a0452b6 /runtime/syntax | |
parent | cd6ad6439da2ee2d1a8a6934c9d69e9c2664ba55 (diff) |
Update runtime files
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/bitbake.vim | 126 | ||||
-rw-r--r-- | runtime/syntax/html.vim | 219 | ||||
-rw-r--r-- | runtime/syntax/make.vim | 12 |
3 files changed, 250 insertions, 107 deletions
diff --git a/runtime/syntax/bitbake.vim b/runtime/syntax/bitbake.vim new file mode 100644 index 0000000000..30f34474ad --- /dev/null +++ b/runtime/syntax/bitbake.vim @@ -0,0 +1,126 @@ +" Vim syntax file +" Language: BitBake bb/bbclasses/inc +" Author: Chris Larson <kergoth@handhelds.org> +" Ricardo Salveti <rsalveti@rsalveti.net> +" Copyright: Copyright (C) 2004 Chris Larson <kergoth@handhelds.org> +" Copyright (C) 2008 Ricardo Salveti <rsalveti@rsalveti.net> +" +" This file is licensed under the MIT license, see COPYING.MIT in +" this source distribution for the terms. +" +" Syntax highlighting for bb, bbclasses and inc files. +" +" It's an entirely new type, just has specific syntax in shell and python code + +if v:version < 600 + finish +endif +if exists("b:current_syntax") + finish +endif + +syn include @python syntax/python.vim +unlet! b:current_syntax + +" BitBake syntax + +" Matching case +syn case match + +" Indicates the error when nothing is matched +syn match bbUnmatched "." + +" Comments +syn cluster bbCommentGroup contains=bbTodo,@Spell +syn keyword bbTodo COMBAK FIXME TODO XXX contained +syn match bbComment "#.*$" contains=@bbCommentGroup + +" String helpers +syn match bbQuote +['"]+ contained +syn match bbDelimiter "[(){}=]" contained +syn match bbArrayBrackets "[\[\]]" contained + +" BitBake strings +syn match bbContinue "\\$" +syn region bbString matchgroup=bbQuote start=+"+ skip=+\\$+ end=+"+ contained contains=bbTodo,bbContinue,bbVarDeref,bbVarPyValue,@Spell +syn region bbString matchgroup=bbQuote start=+'+ skip=+\\$+ end=+'+ contained contains=bbTodo,bbContinue,bbVarDeref,bbVarPyValue,@Spell + +" Vars definition +syn match bbExport "^export" nextgroup=bbIdentifier skipwhite +syn keyword bbExportFlag export contained nextgroup=bbIdentifier skipwhite +syn match bbIdentifier "[a-zA-Z0-9\-_\.\/\+]\+" display contained +syn match bbVarDeref "${[a-zA-Z0-9\-_:\.\/\+]\+}" contained +syn match bbVarEq "\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)" contained nextgroup=bbVarValue +syn match bbVarDef "^\(export\s*\)\?\([a-zA-Z0-9\-_\.\/\+][${}a-zA-Z0-9\-_:\.\/\+]*\)\s*\(:=\|+=\|=+\|\.=\|=\.\|?=\|??=\|=\)\@=" contains=bbExportFlag,bbIdentifier,bbOverrideOperator,bbVarDeref nextgroup=bbVarEq +syn match bbVarValue ".*$" contained contains=bbString,bbVarDeref,bbVarPyValue +syn region bbVarPyValue start=+${@+ skip=+\\$+ end=+}+ contained contains=@python + +" Vars metadata flags +syn match bbVarFlagDef "^\([a-zA-Z0-9\-_\.]\+\)\(\[[a-zA-Z0-9\-_\.+]\+\]\)\@=" contains=bbIdentifier nextgroup=bbVarFlagFlag +syn region bbVarFlagFlag matchgroup=bbArrayBrackets start="\[" end="\]\s*\(:=\|=\|.=\|=.|+=\|=+\|?=\)\@=" contained contains=bbIdentifier nextgroup=bbVarEq + +" Includes and requires +syn keyword bbInclude inherit include require contained +syn match bbIncludeRest ".*$" contained contains=bbString,bbVarDeref +syn match bbIncludeLine "^\(inherit\|include\|require\)\s\+" contains=bbInclude nextgroup=bbIncludeRest + +" Add taks and similar +syn keyword bbStatement addtask deltask addhandler after before EXPORT_FUNCTIONS contained +syn match bbStatementRest ".*$" skipwhite contained contains=bbStatement +syn match bbStatementLine "^\(addtask\|deltask\|addhandler\|after\|before\|EXPORT_FUNCTIONS\)\s\+" contains=bbStatement nextgroup=bbStatementRest + +" OE Important Functions +syn keyword bbOEFunctions do_fetch do_unpack do_patch do_configure do_compile do_stage do_install do_package contained + +" Generic Functions +syn match bbFunction "\h[0-9A-Za-z_\-\.]*" display contained contains=bbOEFunctions + +syn keyword bbOverrideOperator append prepend remove contained + +" BitBake shell metadata +syn include @shell syntax/sh.vim +unlet! b:current_syntax + +syn keyword bbShFakeRootFlag fakeroot contained +syn match bbShFuncDef "^\(fakeroot\s*\)\?\([\.0-9A-Za-z_:${}\-\.]\+\)\(python\)\@<!\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbFunction,bbOverrideOperator,bbVarDeref,bbDelimiter nextgroup=bbShFuncRegion skipwhite +syn region bbShFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@shell + +" Python value inside shell functions +syn region shDeref start=+${@+ skip=+\\$+ excludenl end=+}+ contained contains=@python + +" BitBake python metadata +syn keyword bbPyFlag python contained +syn match bbPyFuncDef "^\(fakeroot\s*\)\?\(python\)\(\s\+[0-9A-Za-z_:${}\-\.]\+\)\?\(\s*()\s*\)\({\)\@=" contains=bbShFakeRootFlag,bbPyFlag,bbFunction,bbOverrideOperator,bbVarDeref,bbDelimiter nextgroup=bbPyFuncRegion skipwhite +syn region bbPyFuncRegion matchgroup=bbDelimiter start="{\s*$" end="^}\s*$" contained contains=@python + +" BitBake 'def'd python functions +syn keyword bbPyDef def contained +syn region bbPyDefRegion start='^\(def\s\+\)\([0-9A-Za-z_-]\+\)\(\s*(.*)\s*\):\s*$' end='^\(\s\|$\)\@!' contains=@python + +" Highlighting Definitions +hi def link bbUnmatched Error +hi def link bbInclude Include +hi def link bbTodo Todo +hi def link bbComment Comment +hi def link bbQuote String +hi def link bbString String +hi def link bbDelimiter Keyword +hi def link bbArrayBrackets Statement +hi def link bbContinue Special +hi def link bbExport Type +hi def link bbExportFlag Type +hi def link bbIdentifier Identifier +hi def link bbVarDeref PreProc +hi def link bbVarDef Identifier +hi def link bbVarValue String +hi def link bbShFakeRootFlag Type +hi def link bbFunction Function +hi def link bbPyFlag Type +hi def link bbPyDef Statement +hi def link bbStatement Statement +hi def link bbStatementRest Identifier +hi def link bbOEFunctions Special +hi def link bbVarPyValue PreProc +hi def link bbOverrideOperator Operator + +let b:current_syntax = "bitbake" diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim index 8ccb5574e7..9061bdee90 100644 --- a/runtime/syntax/html.vim +++ b/runtime/syntax/html.vim @@ -1,12 +1,9 @@ " Vim syntax file -" Language: HTML -" Previous Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net> -" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com> -" Repository: https://notabug.org/jorgesumle/vim-html-syntax -" Last Change: 2021 Mar 02 -" Included patch #7900 to fix comments -" Included patch #7916 to fix a few more things -" +" Language: HTML +" Maintainer: Doug Kearns <dougkearns@gmail.com> +" Previous Maintainers: Jorge Maldonado Ventura <jorgesumle@freakspot.net> +" Claudio Fleiner <claudio@fleiner.com> +" Last Change: 2022 Jul 20 " Please check :help html.vim for some comments and a description of the options @@ -23,6 +20,9 @@ set cpo&vim syntax spell toplevel +syn include @htmlXml syntax/xml.vim +unlet b:current_syntax + syn case ignore " mark illegal characters @@ -30,13 +30,13 @@ syn match htmlError "[<>&]" " tags -syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc -syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc -syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc -syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError -syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster -syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster -syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster +syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc +syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc +syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc +syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError +syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster +syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster +syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster syn match htmlTagError contained "[^>]<"ms=s+1 @@ -47,13 +47,13 @@ syn keyword htmlTagName contained cite code dd dfn dir div dl dt font syn keyword htmlTagName contained form hr html img syn keyword htmlTagName contained input isindex kbd li link map menu syn keyword htmlTagName contained meta ol option param pre p samp span -syn keyword htmlTagName contained select small sub sup +syn keyword htmlTagName contained select small strike sub sup syn keyword htmlTagName contained table td textarea th tr tt ul var xmp -syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>" +syn match htmlTagName contained "\<\%(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>" " new html 4.0 tags -syn keyword htmlTagName contained abbr acronym bdo button col label -syn keyword htmlTagName contained colgroup fieldset iframe ins legend +syn keyword htmlTagName contained abbr acronym bdo button col colgroup +syn keyword htmlTagName contained del fieldset iframe ins label legend syn keyword htmlTagName contained object optgroup q s tbody tfoot thead " new html 5 tags @@ -65,6 +65,15 @@ syn keyword htmlTagName contained progress rb rp rt rtc ruby section syn keyword htmlTagName contained slot source summary template time track syn keyword htmlTagName contained video wbr +" svg and math tags +syn keyword htmlMathTagName contained math +syn keyword htmlSvgTagName contained svg + +syn region htmlMath start="<math>" end="</math>" contains=@htmlXml transparent keepend +syn region htmlSvg start="<svg>" end="</svg>" contains=@htmlXml transparent keepend + +syn cluster xmlTagHook add=htmlMathTagName,htmlSvgTagName + " legal arg names syn keyword htmlArg contained action syn keyword htmlArg contained align alink alt archive background bgcolor @@ -77,7 +86,7 @@ syn keyword htmlArg contained marginwidth maxlength method name prompt syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape syn keyword htmlArg contained size src start target text type url syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap -syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1 +syn match htmlArg contained "\<\%(http-equiv\|href\|title\)="me=e-1 " aria attributes exe 'syn match htmlArg contained "\<aria-\%(' . join([ @@ -95,15 +104,15 @@ syn keyword htmlArg contained role " Netscape extensions syn keyword htmlTagName contained frame noframes frameset nobr blink syn keyword htmlTagName contained layer ilayer nolayer spacer -syn keyword htmlArg contained frameborder noresize pagex pagey above below -syn keyword htmlArg contained left top visibility clip id noshade -syn match htmlArg contained "\<z-index\>" +syn keyword htmlArg contained frameborder noresize pagex pagey above below +syn keyword htmlArg contained left top visibility clip id noshade +syn match htmlArg contained "\<z-index\>" " Microsoft extensions syn keyword htmlTagName contained marquee " html 4.0 arg names -syn match htmlArg contained "\<\(accept-charset\|label\)\>" +syn match htmlArg contained "\<\%(accept-charset\|label\)\>" syn keyword htmlArg contained abbr accept accesskey axis char charoff charset syn keyword htmlArg contained cite classid codetype compact data datetime syn keyword htmlArg contained declare defer dir disabled for frame @@ -113,51 +122,57 @@ syn keyword htmlArg contained rules scheme scope span standby style syn keyword htmlArg contained summary tabindex valuetype version " html 5 arg names -syn keyword htmlArg contained allowfullscreen async autocomplete autofocus -syn keyword htmlArg contained autoplay challenge contenteditable contextmenu -syn keyword htmlArg contained controls crossorigin default dirname download -syn keyword htmlArg contained draggable dropzone form formaction formenctype -syn keyword htmlArg contained formmethod formnovalidate formtarget hidden -syn keyword htmlArg contained high icon inputmode keytype kind list loop low -syn keyword htmlArg contained max min minlength muted nonce novalidate open -syn keyword htmlArg contained optimum pattern placeholder poster preload -syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck -syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate -syn keyword htmlArg contained typemustmatch +syn keyword htmlArg contained allow autocapitalize as blocking decoding +syn keyword htmlArg contained enterkeyhint imagesizes imagesrcset inert +syn keyword htmlArg contained integrity is itemid itemprop itemref itemscope +syn keyword htmlArg contained itemtype loading nomodule ping playsinline +syn keyword htmlArg contained referrerpolicy slot allowfullscreen async +syn keyword htmlArg contained autocomplete autofocus autoplay challenge +syn keyword htmlArg contained contenteditable contextmenu controls crossorigin +syn keyword htmlArg contained default dirname download draggable dropzone form +syn keyword htmlArg contained formaction formenctype formmethod formnovalidate +syn keyword htmlArg contained formtarget hidden high icon inputmode keytype +syn keyword htmlArg contained kind list loop low max min minlength muted nonce +syn keyword htmlArg contained novalidate open optimum pattern placeholder +syn keyword htmlArg contained poster preload radiogroup required reversed +syn keyword htmlArg contained sandbox spellcheck sizes srcset srcdoc srclang +syn keyword htmlArg contained step title translate typemustmatch +syn match htmlArg contained "\<data-\h\%(\w\|[-.]\)*\%(\_s*=\)\@=" " special characters syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" " Comments (the real ones or the old netscape ones) if exists("html_wrong_comments") - syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell + syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell else " The HTML 5.2 syntax 8.2.4.41: bogus comment is parser error; browser skips until next > - syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError keepend + syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentError keepend " Idem 8.2.4.42,51: Comment starts with <!-- and ends with --> " Idem 8.2.4.43,44: Except <!--> and <!---> are parser errors " Idem 8.2.4.52: dash-dash-bang (--!>) is error ignored by parser, also closes comment - syn region htmlComment matchgroup=htmlComment start=+<!--\%(-\?>\)\@!+ end=+--!\?>+ contains=htmlCommentNested,@htmlPreProc,@Spell keepend + syn region htmlComment matchgroup=htmlComment start=+<!--\%(-\?>\)\@!+ end=+--!\?>+ contains=htmlCommentNested,@htmlPreProc,@Spell keepend " Idem 8.2.4.49: nested comment is parser error, except <!--> is all right syn match htmlCommentNested contained "<!-->\@!" syn match htmlCommentError contained "[^><!]" endif -syn region htmlComment start=+<!DOCTYPE+ end=+>+ keepend +syn region htmlComment start=+<!DOCTYPE+ end=+>+ keepend " server-parsed commands syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr -syn match htmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>" +syn match htmlPreStmt contained "<!--#\%(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>" syn match htmlPreError contained "<!--#\S*"ms=s+4 syn match htmlPreAttr contained "\w\+=[^"]\S\+" contains=htmlPreProcAttrError,htmlPreProcAttrName syn region htmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=htmlPreProcAttrName keepend syn match htmlPreProcAttrError contained "\w\+="he=e-1 -syn match htmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1 +syn match htmlPreProcAttrName contained "\%(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1 if !exists("html_no_rendering") " rendering syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc syn region htmlStrike start="<del\>" end="</del\_s*>"me=s-1 contains=@htmlTop + syn region htmlStrike start="<s\>" end="</s\_s*>"me=s-1 contains=@htmlTop syn region htmlStrike start="<strike\>" end="</strike\_s*>"me=s-1 contains=@htmlTop syn region htmlBold start="<b\>" end="</b\_s*>"me=s-1 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic @@ -200,26 +215,26 @@ if !exists("html_no_rendering") syn region htmlTitle start="<title\>" end="</title\_s*>"me=s-1 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc endif -syn keyword htmlTagName contained noscript -syn keyword htmlSpecialTagName contained script style +syn keyword htmlTagName contained noscript +syn keyword htmlSpecialTagName contained script style if main_syntax != 'java' || exists("java_javascript") " JAVA SCRIPT syn include @htmlJavaScript syntax/javascript.vim unlet b:current_syntax syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc - syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent + syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent hi def link htmlScriptTag htmlTag " html events (i.e. arguments that include javascript commands) if exists("html_extended_events") - syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ - syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ + syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ + syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ else - syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ - syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ + syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ + syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ endif - syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript - syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript + syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript + syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript hi def link htmlEventSQ htmlEvent hi def link htmlEventDQ htmlEvent @@ -234,15 +249,15 @@ if main_syntax != 'java' || exists("java_vb") syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc endif -syn cluster htmlJavaScript add=@htmlPreproc +syn cluster htmlJavaScript add=@htmlPreproc if main_syntax != 'java' || exists("java_css") " embedded style sheets - syn keyword htmlArg contained media + syn keyword htmlArg contained media syn include @htmlCss syntax/css.vim unlet b:current_syntax syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc - syn match htmlCssStyleComment contained "\(<!--\|-->\)" + syn match htmlCssStyleComment contained "\%(<!--\|-->\)" syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc hi def link htmlStyleArg htmlString endif @@ -258,68 +273,70 @@ if main_syntax == "html" endif " The default highlighting. -hi def link htmlTag Function -hi def link htmlEndTag Identifier -hi def link htmlArg Type -hi def link htmlTagName htmlStatement -hi def link htmlSpecialTagName Exception -hi def link htmlValue String -hi def link htmlSpecialChar Special +hi def link htmlTag Function +hi def link htmlEndTag Identifier +hi def link htmlArg Type +hi def link htmlTagName htmlStatement +hi def link htmlSpecialTagName Exception +hi def link htmlMathTagName htmlTagName +hi def link htmlSvgTagName htmlTagName +hi def link htmlValue String +hi def link htmlSpecialChar Special if !exists("html_no_rendering") - hi def link htmlH1 Title - hi def link htmlH2 htmlH1 - hi def link htmlH3 htmlH2 - hi def link htmlH4 htmlH3 - hi def link htmlH5 htmlH4 - hi def link htmlH6 htmlH5 - hi def link htmlHead PreProc - hi def link htmlTitle Title - hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic - hi def link htmlUnderlineBold htmlBoldUnderline - hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic - hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic - hi def link htmlItalicUnderline htmlUnderlineItalic - hi def link htmlItalicBold htmlBoldItalic - hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic - hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic - hi def link htmlLink Underlined - hi def link htmlLeadingSpace None + hi def link htmlH1 Title + hi def link htmlH2 htmlH1 + hi def link htmlH3 htmlH2 + hi def link htmlH4 htmlH3 + hi def link htmlH5 htmlH4 + hi def link htmlH6 htmlH5 + hi def link htmlHead PreProc + hi def link htmlTitle Title + hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic + hi def link htmlUnderlineBold htmlBoldUnderline + hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic + hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic + hi def link htmlItalicUnderline htmlUnderlineItalic + hi def link htmlItalicBold htmlBoldItalic + hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic + hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic + hi def link htmlLink Underlined + hi def link htmlLeadingSpace None if !exists("html_my_rendering") - hi def htmlBold term=bold cterm=bold gui=bold - hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline - hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic + hi def htmlBold term=bold cterm=bold gui=bold + hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline + hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline - hi def htmlUnderline term=underline cterm=underline gui=underline - hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline - hi def htmlItalic term=italic cterm=italic gui=italic + hi def htmlUnderline term=underline cterm=underline gui=underline + hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline + hi def htmlItalic term=italic cterm=italic gui=italic if v:version > 800 || v:version == 800 && has("patch1038") - hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough + hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough else - hi def htmlStrike term=underline cterm=underline gui=underline + hi def htmlStrike term=underline cterm=underline gui=underline endif endif endif -hi def link htmlPreStmt PreProc -hi def link htmlPreError Error -hi def link htmlPreProc PreProc -hi def link htmlPreAttr String +hi def link htmlPreStmt PreProc +hi def link htmlPreError Error +hi def link htmlPreProc PreProc +hi def link htmlPreAttr String hi def link htmlPreProcAttrName PreProc hi def link htmlPreProcAttrError Error -hi def link htmlString String -hi def link htmlStatement Statement -hi def link htmlComment Comment -hi def link htmlCommentNested htmlError -hi def link htmlCommentError htmlError -hi def link htmlTagError htmlError -hi def link htmlEvent javaScript -hi def link htmlError Error - -hi def link javaScript Special +hi def link htmlString String +hi def link htmlStatement Statement +hi def link htmlComment Comment +hi def link htmlCommentNested htmlError +hi def link htmlCommentError htmlError +hi def link htmlTagError htmlError +hi def link htmlEvent javaScript +hi def link htmlError Error + +hi def link javaScript Special hi def link javaScriptExpression javaScript hi def link htmlCssStyleComment Comment -hi def link htmlCssDefinition Special +hi def link htmlCssDefinition Special let b:current_syntax = "html" diff --git a/runtime/syntax/make.vim b/runtime/syntax/make.vim index d0d7f1523b..68f7ee21ea 100644 --- a/runtime/syntax/make.vim +++ b/runtime/syntax/make.vim @@ -3,7 +3,7 @@ " Maintainer: Roland Hieber <rohieb+vim-iR0jGdkV@rohieb.name>, <https://github.com/rohieb> " Previous Maintainer: Claudio Fleiner <claudio@fleiner.com> " URL: https://github.com/vim/vim/blob/master/runtime/syntax/make.vim -" Last Change: 2020 May 03 +" Last Change: 2020 Oct 16 " quit when a syntax file was already loaded if exists("b:current_syntax") @@ -45,19 +45,19 @@ syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 syn region makeTarget transparent matchgroup=makeTarget - \ start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 - \ end=";"re=e-1,me=e-1 end="[^\\]$" + \ start="^[~A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*&\?:\?:\{1,2}[^:=]"rs=e-1 + \ end="[^\\]$" \ keepend contains=makeIdent,makeSpecTarget,makeNextLine,makeComment,makeDString \ skipnl nextGroup=makeCommands -syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" +syn match makeTarget "^[~A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*&\?::\=\s*$" \ contains=makeIdent,makeSpecTarget,makeComment \ skipnl nextgroup=makeCommands,makeCommandError syn region makeSpecTarget transparent matchgroup=makeSpecTarget - \ start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 + \ start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\|ONESHELL\)\>\s*:\{1,2}[^:=]"rs=e-1 \ end="[^\\]$" keepend \ contains=makeIdent,makeSpecTarget,makeNextLine,makeComment skipnl nextGroup=makeCommands -syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" +syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\|ONESHELL\)\>\s*::\=\s*$" \ contains=makeIdent,makeComment \ skipnl nextgroup=makeCommands,makeCommandError |