Skip to content

Instantly share code, notes, and snippets.

@samflores
Created August 9, 2013 15:18
Show Gist options
  • Save samflores/6194484 to your computer and use it in GitHub Desktop.
Save samflores/6194484 to your computer and use it in GitHub Desktop.
.vim/after/syntax/html.vim
unlet b:current_syntax
syn include @HTML $VIMRUNTIME/syntax/html.vim
syn include @Handlebars $HOME/.vim/vim-addons/Handlebars/syntax/handlebars.vim
syn region handlebarsTemplate contained
\ start=+<script [^>]*type *=[^>]*text/x-handlebars[^>]*>+
\ end=+</script>+me=s-1 keepend
\ contains=@Handlebars
@samflores
Copy link
Author

it should create a region for <script> tags with type="text/x-handlebar" and apply the Handlebar syntax file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment