Valloric/MatchTagAlways

Not working with handlebars template

Closed this issue · 2 comments

: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.

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! 👍

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