mxw / vim-jsx

React JSX syntax highlighting and indenting for vim.
1.59k stars 95 forks source link

Set filetype to `javascript.jsx`? #31

Closed lencioni closed 9 years ago

lencioni commented 9 years ago

In Vim, you can set multiple filetypes by separating them with a .. This would allow you to have special configuration that applies to only JSX files while inheriting all of the configuration for JavaScript files.

Would you be open to a pull request that sets the filetype to javascript.jsx instead of just javascript, and also moves the other files to only work on jsx filetypes?

mxw commented 9 years ago

Hmm, I wasn't aware of this. I guess this re-raises the question of when to consider a file .jsx—but it gives people an easy way to choose manually via ftdetect. Seems reasonable; feel free to submit a PR, or I can also play around with making this change.