mxw / vim-jsx

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

Add `setlocal suffixesadd+=.jsx` to ftplugin #39

Closed lencioni closed 9 years ago

lencioni commented 9 years ago

This suffixesadd setting helps Vim understand text that references a path and does not contain the .jsx extension, as is often the case in CommonJS style require statements. This improves motions like gf and commands like :find. More information:

http://usevim.com/2013/01/04/vim101-jumping/

mxw commented 9 years ago

Agreed that this is useful—however, the pangloss/vim-javascript bundle doesn't seem to do the same for the .js extension. Since the utility of this feature seems to be based on JS libraries and not JSX itself, perhaps it would be better relegated to packages which support those libraries, or just to the user's local ftplugin/?

lencioni commented 9 years ago

the pangloss/vim-javascript bundle doesn't seem to do the same for the .js extension

The next release will include this. See https://github.com/pangloss/vim-javascript/pull/265

mxw commented 9 years ago

Can't argue with that!