Skip to content

Instantly share code, notes, and snippets.

@thinca
Created September 6, 2010 00:02
Show Gist options
  • Save thinca/566458 to your computer and use it in GitHub Desktop.
Save thinca/566458 to your computer and use it in GitHub Desktop.
syntax include @javaScriptE4X syntax/xml.vim
syntax region javaScriptE4XEmbedded matchgroup=javaScriptBraces start='{' end='}' contains=TOP,javaScriptE4X contained
syntax cluster xmlStartTagHook add=javaScriptE4XEmbedded
syntax cluster xmlRegionHook add=javaScriptE4XEmbedded
syntax cluster xmlTagHook add=javaScriptE4XEmbedded
syn region javaScriptE4X
\ start=@<\z(>\|\w[^ /!?<>"']*\)@
\ skip=+<!--\_.\{-}-->+
\ end=+</\z1\_s\{-}>+
\ contains=xmlTag,xmlEndTag,xmlCdata,xmlComment,xmlEntity,xmlProcessing,@xmlRegionHook,@Spell
\ keepend
\ extend containedin=ALL,javaScriptComment,javaScriptStringD,javaScriptStringS,javaScriptRegexpString,javaScriptE4X
unlet! b:current_syntax
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment