Skip to content

Instantly share code, notes, and snippets.

@caisui
Created May 11, 2013 05:09
Show Gist options
  • Save caisui/5558973 to your computer and use it in GitHub Desktop.
Save caisui/5558973 to your computer and use it in GitHub Desktop.
" vimperator ex
augroup javascriptT
au!
function JavaScriptSyntaxEx()
if match(expand("%:p"), "/vimperator/") >= 0
syntax region javaScriptStringT start="[a-z]*`" end="`" contains=javaScriptSpecial,@htmlPreproc
syntax region javaScriptStringT1 matchgroup=javaScriptStringTBraces start="${" end="}" contains=TOP,javaScriptBraces contained containedin=javaScriptStringT
syntax region javaScriptStringT2 matchgroup=javaScriptBraces start="{" end="}" contains=TOP,javaScriptBraces contained containedin=javaScriptStringT1,javaScriptStringT2
hi link javaScriptStringT String
hi link javaScriptStringTBraces Special
endif
endf
au Syntax javascript call JavaScriptSyntaxEx()
"au BufEnter call JavaScriptSyntaxEx()
augroup END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment