From e2bbed8acc1f1cf498a0085cf771cf9bf40fb709 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Thu, 24 Sep 2020 10:50:19 +0200 Subject: Fix django highlighting, fixes #553 --- syntax/aspperl.vim | 29 ++++++++ syntax/aspvbs.vim | 186 ++++++++++++++++++++++++++++++++++++++++++++++ syntax/django.vim | 87 ++++++++++++++++++++++ syntax/handlebars.vim | 110 ++++++++++++++++++++++++++++ syntax/html-1.vim | 196 ------------------------------------------------- syntax/html-2.vim | 94 ------------------------ syntax/html.vim | 199 +++++++++++++++++++++++++++++++++++++++++++++++++- syntax/htmldjango.vim | 30 ++++++++ syntax/jinja.vim | 90 ----------------------- syntax/mustache.vim | 107 +-------------------------- 10 files changed, 639 insertions(+), 489 deletions(-) create mode 100644 syntax/aspperl.vim create mode 100644 syntax/aspvbs.vim create mode 100644 syntax/django.vim create mode 100644 syntax/handlebars.vim delete mode 100644 syntax/html-1.vim delete mode 100644 syntax/html-2.vim create mode 100644 syntax/htmldjango.vim delete mode 100644 syntax/jinja.vim (limited to 'syntax') diff --git a/syntax/aspperl.vim b/syntax/aspperl.vim new file mode 100644 index 00000000..18933caf --- /dev/null +++ b/syntax/aspperl.vim @@ -0,0 +1,29 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aspperl') == -1 + +" Vim syntax file +" Language: Active State's PerlScript (ASP) +" Maintainer: Aaron Hope +" URL: http://nim.dhs.org/~edh/aspperl.vim +" Last Change: 2001 May 09 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'perlscript' +endif + +runtime! syntax/html.vim +unlet b:current_syntax +syn include @AspPerlScript syntax/perl.vim + +syn cluster htmlPreproc add=AspPerlScriptInsideHtmlTags + +syn region AspPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\=+ skip=+".*%>.*"+ end=+%>+ contains=@AspPerlScript +syn region AspPerlScriptInsideHtmlTags keepend matchgroup=Delimiter start=+]*>+ end=++ contains=@AspPerlScript + +let b:current_syntax = "aspperl" + +endif diff --git a/syntax/aspvbs.vim b/syntax/aspvbs.vim new file mode 100644 index 00000000..d9cf40c6 --- /dev/null +++ b/syntax/aspvbs.vim @@ -0,0 +1,186 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aspvbs') == -1 + +" Vim syntax file +" Language: Microsoft VBScript Web Content (ASP) +" Maintainer: Devin Weaver (non-functional) +" URL: http://tritarget.com/pub/vim/syntax/aspvbs.vim (broken) +" Last Change: 2006 Jun 19 +" by Dan Casey +" Version: $Revision: 1.3 $ +" Thanks to Jay-Jay for a syntax sync hack, hungarian +" notation, and extra highlighting. +" Thanks to patrick dehne for the folding code. +" Thanks to Dean Hall for testing the use of classes in +" VBScripts which I've been too scared to do. + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'aspvbs' +endif + +runtime! syntax/html.vim +unlet b:current_syntax + +syn cluster htmlPreProc add=AspVBScriptInsideHtmlTags + + +" Colored variable names, if written in hungarian notation +hi def AspVBSVariableSimple term=standout ctermfg=3 guifg=#99ee99 +hi def AspVBSVariableComplex term=standout ctermfg=3 guifg=#ee9900 +syn match AspVBSVariableSimple contained "\<\(bln\|byt\|dtm\=\|dbl\|int\|str\)\u\w*" +syn match AspVBSVariableComplex contained "\<\(arr\|ary\|obj\)\u\w*" + + +" Functions and methods that are in VB but will cause errors in an ASP page +" This is helpfull if your porting VB code to ASP +" I removed (Count, Item) because these are common variable names in AspVBScript +syn keyword AspVBSError contained Val Str CVar CVDate DoEvents GoSub Return GoTo +syn keyword AspVBSError contained Stop LinkExecute Add Type LinkPoke +syn keyword AspVBSError contained LinkRequest LinkSend Declare Optional Sleep +syn keyword AspVBSError contained ParamArray Static Erl TypeOf Like LSet RSet Mid StrConv +" It may seem that most of these can fit into a keyword clause but keyword takes +" priority over all so I can't get the multi-word matches +syn match AspVBSError contained "\" +syn match AspVBSError contained "^\s*Open\s\+" +syn match AspVBSError contained "Debug\.[a-zA-Z0-9_]*" +syn match AspVBSError contained "^\s*[a-zA-Z0-9_]\+:" +syn match AspVBSError contained "[a-zA-Z0-9_]\+![a-zA-Z0-9_]\+" +syn match AspVBSError contained "^\s*#.*$" +syn match AspVBSError contained "\\|\" +syn match AspVBSError contained "\\|\\|\\|\\|\" +syn match AspVBSError contained "\" +" This one I want 'cause I always seem to mis-spell it. +syn match AspVBSError contained "Respon\?ce\.\S*" +syn match AspVBSError contained "Respose\.\S*" +" When I looked up the VBScript syntax it mentioned that Property Get/Set/Let +" statements are illegal, however, I have recived reports that they do work. +" So I commented it out for now. +" syn match AspVBSError contained "\" + +" AspVBScript Reserved Words. +syn match AspVBSStatement contained "\\|\" +syn match AspVBSStatement contained "\" +syn match AspVBSStatement contained "\" +syn match AspVBSStatement contained "\" +syn match AspVBSStatement contained "\" +syn match AspVBSStatement contained "\\|\" +syn match AspVBSStatement contained "\" +syn keyword AspVBSStatement contained Call Class Const Default Dim Do Loop Erase And +syn keyword AspVBSStatement contained Function If Then Else ElseIf Or +syn keyword AspVBSStatement contained Private Public Randomize ReDim +syn keyword AspVBSStatement contained Select Case Sub While With Wend Not + +" AspVBScript Functions +syn keyword AspVBSFunction contained Abs Array Asc Atn CBool CByte CCur CDate CDbl +syn keyword AspVBSFunction contained Chr CInt CLng Cos CreateObject CSng CStr Date +syn keyword AspVBSFunction contained DateAdd DateDiff DatePart DateSerial DateValue +syn keyword AspVBSFunction contained Date Day Exp Filter Fix FormatCurrency +syn keyword AspVBSFunction contained FormatDateTime FormatNumber FormatPercent +syn keyword AspVBSFunction contained GetObject Hex Hour InputBox InStr InStrRev Int +syn keyword AspVBSFunction contained IsArray IsDate IsEmpty IsNull IsNumeric +syn keyword AspVBSFunction contained IsObject Join LBound LCase Left Len LoadPicture +syn keyword AspVBSFunction contained Log LTrim Mid Minute Month MonthName MsgBox Now +syn keyword AspVBSFunction contained Oct Replace RGB Right Rnd Round RTrim +syn keyword AspVBSFunction contained ScriptEngine ScriptEngineBuildVersion +syn keyword AspVBSFunction contained ScriptEngineMajorVersion +syn keyword AspVBSFunction contained ScriptEngineMinorVersion Second Sgn Sin Space +syn keyword AspVBSFunction contained Split Sqr StrComp StrReverse String Tan Time Timer +syn keyword AspVBSFunction contained TimeSerial TimeValue Trim TypeName UBound UCase +syn keyword AspVBSFunction contained VarType Weekday WeekdayName Year + +" AspVBScript Methods +syn keyword AspVBSMethods contained Add AddFolders BuildPath Clear Close Copy +syn keyword AspVBSMethods contained CopyFile CopyFolder CreateFolder CreateTextFile +syn keyword AspVBSMethods contained Delete DeleteFile DeleteFolder DriveExists +syn keyword AspVBSMethods contained Exists FileExists FolderExists +syn keyword AspVBSMethods contained GetAbsolutePathName GetBaseName GetDrive +syn keyword AspVBSMethods contained GetDriveName GetExtensionName GetFile +syn keyword AspVBSMethods contained GetFileName GetFolder GetParentFolderName +syn keyword AspVBSMethods contained GetSpecialFolder GetTempName Items Keys Move +syn keyword AspVBSMethods contained MoveFile MoveFolder OpenAsTextStream +syn keyword AspVBSMethods contained OpenTextFile Raise Read ReadAll ReadLine Remove +syn keyword AspVBSMethods contained RemoveAll Skip SkipLine Write WriteBlankLines +syn keyword AspVBSMethods contained WriteLine +syn match AspVBSMethods contained "Response\.\w*" +" Colorize boolean constants: +syn keyword AspVBSMethods contained true false + +" AspVBScript Number Contstants +" Integer number, or floating point number without a dot. +syn match AspVBSNumber contained "\<\d\+\>" +" Floating point number, with dot +syn match AspVBSNumber contained "\<\d\+\.\d*\>" +" Floating point number, starting with a dot +syn match AspVBSNumber contained "\.\d\+\>" + +" String and Character Contstants +" removed (skip=+\\\\\|\\"+) because VB doesn't have backslash escaping in +" strings (or does it?) +syn region AspVBSString contained start=+"+ end=+"+ keepend + +" AspVBScript Comments +syn region AspVBSComment contained start="^REM\s\|\sREM\s" end="$" contains=AspVBSTodo keepend +syn region AspVBSComment contained start="^'\|\s'" end="$" contains=AspVBSTodo keepend +" misc. Commenting Stuff +syn keyword AspVBSTodo contained TODO FIXME + +" Cosmetic syntax errors commanly found in VB but not in AspVBScript +" AspVBScript doesn't use line numbers +syn region AspVBSError contained start="^\d" end="\s" keepend +" AspVBScript also doesn't have type defining variables +syn match AspVBSError contained "[a-zA-Z0-9_][\$&!#]"ms=s+1 +" Since 'a%' is a VB variable with a type and in AspVBScript you can have 'a%>' +" I have to make a special case so 'a%>' won't show as an error. +syn match AspVBSError contained "[a-zA-Z0-9_]%\($\|[^>]\)"ms=s+1 + +" Top Cluster +syn cluster AspVBScriptTop contains=AspVBSStatement,AspVBSFunction,AspVBSMethods,AspVBSNumber,AspVBSString,AspVBSComment,AspVBSError,AspVBSVariableSimple,AspVBSVariableComplex + +" Folding +syn region AspVBSFold start="^\s*\(class\)\s\+.*$" end="^\s*end\s\+\(class\)\>.*$" fold contained transparent keepend +syn region AspVBSFold start="^\s*\(private\|public\)\=\(\s\+default\)\=\s\+\(sub\|function\)\s\+.*$" end="^\s*end\s\+\(function\|sub\)\>.*$" fold contained transparent keepend + +" Define AspVBScript delimeters +" <%= func("string_with_%>_in_it") %> This is illegal in ASP syntax. +syn region AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+<%=\=+ end=+%>+ contains=@AspVBScriptTop, AspVBSFold +syn region AspVBScriptInsideHtmlTags keepend matchgroup=Delimiter start=+]*\s\+runatserver[^>]*>+ end=++ contains=@AspVBScriptTop + + +" Synchronization +" syn sync match AspVBSSyncGroup grouphere AspVBScriptInsideHtmlTags "<%" +" This is a kludge so the HTML will sync properly +syn sync match htmlHighlight grouphere htmlTag "%>" + + + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +"hi def link AspVBScript Special +hi def link AspVBSLineNumber Comment +hi def link AspVBSNumber Number +hi def link AspVBSError Error +hi def link AspVBSStatement Statement +hi def link AspVBSString String +hi def link AspVBSComment Comment +hi def link AspVBSTodo Todo +hi def link AspVBSFunction Identifier +hi def link AspVBSMethods PreProc +hi def link AspVBSEvents Special +hi def link AspVBSTypeSpecifier Type + + +let b:current_syntax = "aspvbs" + +if main_syntax == 'aspvbs' + unlet main_syntax +endif + +" vim: ts=8:sw=2:sts=0:noet + +endif diff --git a/syntax/django.vim b/syntax/django.vim new file mode 100644 index 00000000..b11caa98 --- /dev/null +++ b/syntax/django.vim @@ -0,0 +1,87 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'htmldjango') == -1 + +" Vim syntax file +" Language: Django template +" Maintainer: Dave Hodder +" Last Change: 2014 Jul 13 + +" quit when a syntax file was already loaded +if exists("b:current_syntax") + finish +endif + +syntax case match + +" Mark illegal characters +syn match djangoError "%}\|}}\|#}" + +" Django template built-in tags and parameters +" 'comment' doesn't appear here because it gets special treatment +syn keyword djangoStatement contained autoescape csrf_token empty +" FIXME ==, !=, <, >, <=, and >= should be djangoStatements: +" syn keyword djangoStatement contained == != < > <= >= +syn keyword djangoStatement contained and as block endblock by cycle debug else elif +syn keyword djangoStatement contained extends filter endfilter firstof for +syn keyword djangoStatement contained endfor if endif ifchanged endifchanged +syn keyword djangoStatement contained ifequal endifequal ifnotequal +syn keyword djangoStatement contained endifnotequal in include load not now or +syn keyword djangoStatement contained parsed regroup reversed spaceless +syn keyword djangoStatement contained endspaceless ssi templatetag openblock +syn keyword djangoStatement contained closeblock openvariable closevariable +syn keyword djangoStatement contained openbrace closebrace opencomment +syn keyword djangoStatement contained closecomment widthratio url with endwith +syn keyword djangoStatement contained get_current_language trans noop blocktrans +syn keyword djangoStatement contained endblocktrans get_available_languages +syn keyword djangoStatement contained get_current_language_bidi plural + +" Django templete built-in filters +syn keyword djangoFilter contained add addslashes capfirst center cut date +syn keyword djangoFilter contained default default_if_none dictsort +syn keyword djangoFilter contained dictsortreversed divisibleby escape escapejs +syn keyword djangoFilter contained filesizeformat first fix_ampersands +syn keyword djangoFilter contained floatformat get_digit join last length length_is +syn keyword djangoFilter contained linebreaks linebreaksbr linenumbers ljust +syn keyword djangoFilter contained lower make_list phone2numeric pluralize +syn keyword djangoFilter contained pprint random removetags rjust slice slugify +syn keyword djangoFilter contained safe safeseq stringformat striptags +syn keyword djangoFilter contained time timesince timeuntil title truncatechars +syn keyword djangoFilter contained truncatewords truncatewords_html unordered_list upper urlencode +syn keyword djangoFilter contained urlize urlizetrunc wordcount wordwrap yesno + +" Keywords to highlight within comments +syn keyword djangoTodo contained TODO FIXME XXX + +" Django template constants (always surrounded by double quotes) +syn region djangoArgument contained start=/"/ skip=/\\"/ end=/"/ + +" Mark illegal characters within tag and variables blocks +syn match djangoTagError contained "#}\|{{\|[^%]}}\|[&#]" +syn match djangoVarError contained "#}\|{%\|%}\|[<>!&#%]" + +" Django template tag and variable blocks +syn region djangoTagBlock start="{%" end="%}" contains=djangoStatement,djangoFilter,djangoArgument,djangoTagError display +syn region djangoVarBlock start="{{" end="}}" contains=djangoFilter,djangoArgument,djangoVarError display + +" Django template 'comment' tag and comment block +syn region djangoComment start="{%\s*comment\(\s\+.\{-}\)\?%}" end="{%\s*endcomment\s*%}" contains=djangoTodo +syn region djangoComBlock start="{#" end="#}" contains=djangoTodo + +" Define the default highlighting. +" Only when an item doesn't have highlighting yet + +hi def link djangoTagBlock PreProc +hi def link djangoVarBlock PreProc +hi def link djangoStatement Statement +hi def link djangoFilter Identifier +hi def link djangoArgument Constant +hi def link djangoTagError Error +hi def link djangoVarError Error +hi def link djangoError Error +hi def link djangoComment Comment +hi def link djangoComBlock Comment +hi def link djangoTodo Todo + + +let b:current_syntax = "django" + +endif diff --git a/syntax/handlebars.vim b/syntax/handlebars.vim new file mode 100644 index 00000000..52c2913a --- /dev/null +++ b/syntax/handlebars.vim @@ -0,0 +1,110 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') == -1 + +" Mustache & Handlebars syntax +" Language: Mustache, Handlebars +" Maintainer: Juvenn Woo +" Screenshot: http://imgur.com/6F408 +" Version: 6 +" Last Change: Jul 16 2019 +" Remark: +" It lexically hilights embedded mustaches (exclusively) in html file. +" While it was written for Ruby-based Mustache template system, it should +" work for Google's C-based *ctemplate* as well as Erlang-based *et*. All +" of them are, AFAIK, based on the idea of ctemplate. +" References: +" [Mustache](http://github.com/defunkt/mustache) +" [Handlebars](https://github.com/wycats/handlebars.js) +" [ctemplate](http://code.google.com/p/google-ctemplate/) +" [ctemplate doc](http://google-ctemplate.googlecode.com/svn/trunk/doc/howto.html) +" [et](http://www.ivan.fomichev.name/2008/05/erlang-template-engine-prototype.html) +" TODO: Feedback is welcomed. + + +" Read the HTML syntax to start with +if version < 600 + so :p:h/html.vim +else + runtime! syntax/html.vim + unlet b:current_syntax +endif + +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +" Standard HiLink will not work with included syntax files +if version < 508 + command! -nargs=+ HtmlHiLink hi link +else + command! -nargs=+ HtmlHiLink hi def link +endif + +syntax match mustacheError '}}}\?' +syntax match mustacheInsideError '{{[{$#<>=!\/]\?' + +" Ember angle bracket syntax syntax starts with a capital letter: +" https://github.com/emberjs/rfcs/blob/master/text/0311-angle-bracket-invocation.md +syntax case match +syntax region mustacheAngleComponent start=/<\/\?[[:upper:]]/ end=/>/ keepend containedin=TOP,@htmlMustacheContainer +syntax case ignore +syntax match mustacheAngleBrackets '' contained containedin=mustacheAngleComponent +syntax match mustacheAngleComponentName '' contained containedin=@mustacheInside,mustacheParam +syntax region mustacheHtmlValue start=/={{[^!][$#^/]\?/rs=s+1,hs=s+1 end=/}}/ oneline keepend contained containedin=htmlTag contains=@mustacheInside +syntax region mustachePartial start=/{{[<>]/lc=2 end=/}}/me=e-2 contained containedin=@mustacheInside,@htmlMustacheContainer +syntax region mustacheMarkerSet start=/{{=/lc=2 end=/=}}/me=e-2 contained containedin=@mustacheInside,@htmlMustacheContainer +syntax match mustacheHandlebars '{{\|}}' contained containedin=@mustacheInside +syntax match mustacheUnescape '{{{\|}}}' contained containedin=@mustacheInside +syntax match mustacheConditionals '\([/#]\?\<\(if\|unless\)\|\' contained containedin=@mustacheInside +syntax match mustacheHelpers '[/#]\?\<\(with\|link\-to\|each\(\-in\)\?\|let\)\>' contained containedin=@mustacheInside +syntax match mustacheHelpers 'else \(if\|unless\|with\|link\-to\|each\(\-in\)\?\)' contained containedin=@mustacheInside +syntax match mustacheParam /[a-z@_-]\+=/he=e-1 contained containedin=@mustacheInside +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 + +" Clustering +syntax cluster htmlMustacheContainer add=htmlHead,htmlTitle,htmlString,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,htmlLink,htmlBold,htmlUnderline,htmlItalic,htmlValue + + +" Hilighting +" mustacheInside hilighted as Number, which is rarely used in html +" you might like change it to Function or Identifier +HtmlHiLink mustacheVariable Number +HtmlHiLink mustacheVariableUnescape Number +HtmlHiLink mustachePartial Number +HtmlHiLink mustacheMarkerSet Number +HtmlHiLink mustacheParam htmlArg +HtmlHiLink mustacheAngleComponentName htmlTag + +HtmlHiLink mustacheComment Comment +HtmlHiLink mustacheBlockComment Comment +HtmlHiLink mustacheError Error +HtmlHiLink mustacheInsideError Error + +HtmlHiLink mustacheHandlebars Special +HtmlHiLink mustacheAngleBrackets htmlTagName +HtmlHiLink mustacheUnescape Identifier +HtmlHiLink mustacheOperators Operator +HtmlHiLink mustacheConditionals Conditional +HtmlHiLink mustacheHelpers Repeat +HtmlHiLink mustacheQString String +HtmlHiLink mustacheDQString String + +syn region mustacheScriptTemplate start=++me=s-1 keepend +\ contains=mustacheInside,@htmlMustacheContainer,htmlTag,htmlEndTag,htmlTagName,htmlSpecialChar + +let b:current_syntax = "handlebars" +delcommand HtmlHiLink + +endif diff --git a/syntax/html-1.vim b/syntax/html-1.vim deleted file mode 100644 index 633a157e..00000000 --- a/syntax/html-1.vim +++ /dev/null @@ -1,196 +0,0 @@ -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html5') == -1 - -" Vim syntax file -" Language: HTML (version 5.1) -" SVG (SVG 1.1 Second Edition) -" MathML (MathML 3.0 Second Edition) -" Last Change: 2017 Mar 07 -" License: Public domain -" (but let me know if you like :) ) -" -" Note: This file just add new tags from HTML 5 -" and don't replace default html.vim syntax file -" -" Maintainer: Kao, Wei-Ko(othree) ( othree AT gmail DOT com ) -" Changes: update to Draft 2016 Jan 13 -" add microdata Attributes -" Maintainer: Rodrigo Machado -" URL: http://rm.blog.br/vim/syntax/html.vim -" Modified: htdebeer -" Changes: add common SVG elements and attributes for inline SVG - -" Patch 7.4.1142 -if has("patch-7.4-1142") - if has("win32") - syn iskeyword @,48-57,_,128-167,224-235,- - else - syn iskeyword @,48-57,_,192-255,- - endif -endif - -" HTML 5 tags -syn keyword htmlTagName contained article aside audio canvas command -syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer -syn keyword htmlTagName contained header hgroup keygen main mark meter menu menuitem nav output -syn keyword htmlTagName contained progress ruby rt rp rb rtc section source summary time track video data -syn keyword htmlTagName contained template content shadow slot -syn keyword htmlTagName contained wbr bdi -syn keyword htmlTagName contained picture - -" SVG tags -" http://www.w3.org/TR/SVG/ -" as found in http://www.w3.org/TR/SVG/eltindex.html -syn keyword htmlTagName contained svg -syn keyword htmlTagName contained altGlyph altGlyphDef altGlyphItem -syn keyword htmlTagName contained animate animateColor animateMotion animateTransform -syn keyword htmlTagName contained circle ellipse rect line polyline polygon image path -syn keyword htmlTagName contained clipPath color-profile cursor -syn keyword htmlTagName contained defs desc g symbol view use switch foreignObject -syn keyword htmlTagName contained filter feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence -syn keyword htmlTagName contained font font-face font-face-format font-face-name font-face-src font-face-uri -syn keyword htmlTagName contained glyph glyphRef hkern -syn keyword htmlTagName contained linearGradient marker mask pattern radialGradient set stop -syn keyword htmlTagName contained missing-glyph mpath -syn keyword htmlTagName contained text textPath tref tspan vkern -syn keyword htmlTagName contained metadata title - -" MathML tags -" https://www.w3.org/TR/MathML3/appendixi.html#index.elem -syn keyword htmlTagName contained abs and annotation annotation-xml apply approx arccos arccosh arccot arccoth -syn keyword htmlTagName contained arccsc arccsch arcsec arcsech arcsin arcsinh arctan arctanh arg bind -syn keyword htmlTagName contained bvar card cartesianproduct cbytes ceiling cerror ci cn codomain complexes -syn keyword htmlTagName contained compose condition conjugate cos cosh cot coth cs csc csch -syn keyword htmlTagName contained csymbol curl declare degree determinant diff divergence divide domain domainofapplication -syn keyword htmlTagName contained emptyset eq equivalent eulergamma exists exp exponentiale factorial factorof false -syn keyword htmlTagName contained floor fn forall gcd geq grad gt ident image imaginary -syn keyword htmlTagName contained imaginaryi implies in infinity int integers intersect interval inverse lambda -syn keyword htmlTagName contained laplacian lcm leq limit list ln log logbase lowlimit lt -syn keyword htmlTagName contained maction maligngroup malignmark math matrix matrixrow max mean median menclose -syn keyword htmlTagName contained merror mfenced mfrac mglyph mi mi" min minus mlabeledtr mlongdiv -syn keyword htmlTagName contained mmultiscripts mn mo mode moment momentabout mover mpadded mphantom mprescripts -syn keyword htmlTagName contained mroot mrow ms mscarries mscarry msgroup msline mspace msqrt msrow -syn keyword htmlTagName contained mstack mstyle msub msubsup msup mtable mtd mtext mtr munder -syn keyword htmlTagName contained munderover naturalnumbers neq none not notanumber notin notprsubset notsubset or -syn keyword htmlTagName contained otherwise outerproduct partialdiff pi piece piecewise plus power primes product -syn keyword htmlTagName contained prsubset quotient rationals real reals reln rem root scalarproduct sdev -syn keyword htmlTagName contained sec sech selector semantics sep set setdiff share sin sinh -syn keyword htmlTagName contained span subset sum tan tanh tendsto times transpose true union -syn keyword htmlTagName contained uplimit variance vector vectorproduct xor - -" Custom Element -syn match htmlTagName contained "\<[a-z][-.0-9_a-z]*-[-.0-9_a-z]*\>" -syn match htmlTagName contained "[.0-9_a-z]\@<=-[-.0-9_a-z]*\>" - -" HTML 5 arguments -" Core Attributes -syn keyword htmlArg contained accesskey class contenteditable contextmenu dir -syn keyword htmlArg contained draggable hidden id is lang spellcheck style tabindex title translate -" Event-handler Attributes -syn keyword htmlArg contained onabort onblur oncanplay oncanplaythrough onchange -syn keyword htmlArg contained onclick oncontextmenu ondblclick ondrag ondragend ondragenter ondragleave ondragover -syn keyword htmlArg contained ondragstart ondrop ondurationchange onemptied onended onerror onfocus onformchange -syn keyword htmlArg contained onforminput oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata -syn keyword htmlArg contained onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup -syn keyword htmlArg contained onmousewheel onpause onplay onplaying onprogress onratechange onreadystatechange -syn keyword htmlArg contained onscroll onseeked onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate -syn keyword htmlArg contained onvolumechange onwaiting -" XML Attributes -syn keyword htmlArg contained xml:lang xml:space xml:base xmlns -" new features -" -syn keyword htmlArg contained onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload -syn keyword htmlArg contained onmessage onoffline ononline onpopstate onredo onresize onstorage onundo onunload -"