Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwriting Handlebars syntax #8

Open
k3rni opened this issue Dec 31, 2015 · 0 comments
Open

Overwriting Handlebars syntax #8

k3rni opened this issue Dec 31, 2015 · 0 comments

Comments

@k3rni
Copy link

k3rni commented Dec 31, 2015

Polyglot is my plugin of choice for syntax highlighting. However, ember.vim overwrites its rules for Handlebars files:

:autocmd BufRead *.hbs                                    
--- Auto-Commands ---                                 
BufRead                                                         
    *.hbs     set filetype=html.handlebars syntax=mustache | runtime! ftplugin/mustache.vim ftplugin/mustache*.vim ftplugin/mustache/*.vim
    *.hbs     set filetype=handlebars.ember                                                  

which lands me with no html highlighting.

Since vim doesn't provide a way to unregister a single autocmd, I have to overwrite this with yet another autocmd in my vimrc, but losing the convenience polyglot provided.

Culprit: ftdetect/handlebars.vim.

Possible solution: at least wrap it in its own group (augroup ember.vim ... augroup end); this will let users disable the entire group. Or maybe just append an ember filetype at the end in the autocmd (set ft+=.ember).

I prefer the first solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant