Closed markvincze closed 8 years ago
With quite a lot a googling I found one solution, adding this to .vimrc:
au BufRead,BufNewFile *.es6 setfiletype javascript
It's working, though I don't know if this is the canonical solution.
You probably want javascript.jsx
. This is the standard method of doing ftdetect; it's not specific to vim-jsx or any other language of package.
@mxw
Umm, what is javascript.jsx
? Is it a vim plugin? I didn't find anything with Google.
It's the concatenation of two different filetypes—that's just how you separate them.
Ah, so the command should be
au BufRead,BufNewFile *.es6 setfiletype javascript.jsx
right? Thanks for the clarification!
Yes.
I see that by setting
let g:jsx_ext_required = 0
I can enable vim-jsx for .js files.Is there a way to enable the plugin for .es6 files as well?