Valloric / MatchTagAlways

A Vim plugin that always highlights the enclosing html/xml tags
http://valloric.github.com/MatchTagAlways/
GNU General Public License v3.0
541 stars 24 forks source link

Not working with handlebars template #15

Closed miguelmota closed 9 years ago

miguelmota commented 9 years ago
:set ft?
filetype=hbs syntax=html
let g:mta_filetypes =
      \ get( g:, 'mta_filetypes', {
      \ 'html' : 1,
      \ 'xhtml' : 1,
      \ 'xml' : 1,
      \ 'jinja' : 1,
      \ 'eruby' : 1,
      \ 'htmldjango' : 1,
      \ 'django' : 1,
      \ 'hbs' : 1,
      \} )

index.hbs

<div>
 <span>{{name}}</span>
</div>

Changing the extension to html works perfectly fine, but it's not working with hbs extension.

mcmahoniel commented 9 years ago

When I run :set ft? on my .hbs file, I get filetype=html.handlebars.

Adding \ 'html.handlebars' : 1, to my .vimrc makes tag highlighting work properly.

Hope it works for you! :+1:

miguelmota commented 9 years ago

Alright so I had to install the bundle mustache/vim-mustache-handlebars and then MatchTag worked, as @mcmahoniel mentioned.