diff --git a/vim/syntax/html_custom.vim b/vim/syntax/html_custom.vim index b76f65b..4bea760 100644 --- a/vim/syntax/html_custom.vim +++ b/vim/syntax/html_custom.vim @@ -31,27 +31,25 @@ syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,ja syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc -syn region cssClassAttr contained start=+class="+hs=s+7 end=+"+he=e-1 contains=htmlSpecialChar,cssClass,cssAttrNoise,cssClassName keepend -syn region cssClassAttr contained start=+class='+hs=s+7 end=+'+he=e-1 contains=htmlSpecialChar,cssClass,cssAttrNoise,cssClassName keepend +syn region cssClassRegion contained start=+class="+hs=s+7 end=+"+he=e-1 contains=htmlSpecialChar,cssClassAttr,cssAttrNoise,cssClassName keepend +syn region cssClassRegion contained start=+class='+hs=s+7 end=+'+he=e-1 contains=htmlSpecialChar,cssClassAttr,cssAttrNoise,cssClassName keepend -syn region cssIdAttr contained start=+id="+hs=s+4 end=+"+he=e-1 contains=htmlSpecialChar,cssIdentifier,cssAttrNoise,cssIdentifierName keepend -syn region cssIdAttr contained start=+id='+hs=s+4 end=+'+he=e-1 contains=htmlSpecialChar,cssIdentifier,cssAttrNoise,cssIdentifierName keepend +syn region cssIdRegion contained start=+id="+hs=s+4 end=+"+he=e-1 contains=htmlSpecialChar,cssIdentifierAttr,cssAttrNoise,cssIdentifier keepend +syn region cssIdRegion contained start=+id='+hs=s+4 end=+'+he=e-1 contains=htmlSpecialChar,cssIdentifierAttr,cssAttrNoise,cssIdentifier keepend syn region cssClassName contained start=+"+hs=s+1 end=+"+he=e-1 contains=cssAttrNoise keepend -syn region cssIdentifierName contained start=+"+hs=s+1 end=+"+he=s-1 contains=cssAttrNoise keepend +syn region cssIdentifier contained start=+"+hs=s+1 end=+"+he=s-1 contains=cssAttrNoise keepend -syn match cssClass "class" contained -syn match cssIdentifier "id" contained +syn match cssClassAttr "class" contained +syn match cssIdentifierAttr "id" contained syn match cssAttrNoise +=+ contained hi def link cssAttrNoise htmlTag - -hi cssClassAttr ctermfg=201 -hi cssIdAttr ctermfg=129 -hi cssClass ctermfg=255 -hi cssIdentifier ctermfg=255 - +hi def link cssClassName identifier +hi def link cssIdentifier identifier +hi def link cssClassAttr identifier +hi def link cssIdentifierAttr identifier "syn region @@ -60,7 +58,7 @@ syn region htmlIdString contained start=+id='+ end=+'+ contains=htmlSpecialCh syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc syn region htmlEndTag start=++ contains=htmlTagN,htmlTagError -syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,cssClassAttr,cssIdAttr,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster +syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,cssClassRegion,cssIdRegion,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 +]<"ms=s+1