mxw / vim-jsx

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

Why is everything in the after directory? #53

Closed moll closed 9 years ago

moll commented 9 years ago

I believe the after directory is meant for customizing existing syntaxes and plugins. JSX.vim is a plugin itself, so shouldn't it live outside the after directory?

mxw commented 9 years ago

vim-jsx alters existing the behavior of existing syntax packages (namely, vim-javascript) in certain contexts (i.e., when JSX syntax is enabled). It requires that vim-javascript be loaded, and hence should be in the after/ directory.

moll commented 9 years ago

I'd say it's more like C and C++, where the latter is a superset of the former and thereby C++'s syntax file refers and requires C's. Similarly, a JSX syntax file would require JavaScript's. Vim's help even talks about this case and I don't recall it suggesting things to be put in the after folder.