-
Notifications
You must be signed in to change notification settings - Fork 41
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
matching filetypes with a dot in the name #48
Comments
I was also thinking about wanting this to work. Maybe there's something @mxw could do to help with this too? |
@selimober—Is the issue that your .vim file simply isn't being loaded, or that it doesn't work with JSX's embedded XML? You should be able to test the former by adding an :echo or an :echom somewhere in the ftplugin file. (I would be surprised if this were the case... if you have an ftplugin/javascript.vim file, it should work for all JS and JSX files.) If it's just that your plugin itself doesn't support JSX, I'm not sure how I can help you short of hacking on your plugin. |
@mxw — Thanks for helping. The plugin I mentioned is in fact a JSX plugin. So it does support JSX. 1- I did put an 2- Now, even with the jsx plugin disabled, and "xmledit running..." message displayed, tags are not automatically closed in javascript files, I mean when I close Thanks for trying to help anyways.. |
That behavior is inconsistent with how vim is supposed to behave... when you set a filetype to be foo.bar.baz, then ftplugin/foo.vim, ftplugin/bar.vim, and ftplugin/baz.vim should all get run, and this is the behavior I see... |
Yeah—Unless this package does some weird and narrow filetype-matching, in principle, you can incorporate the syntax, indent, and ftplugin files for any number of filetypes by just setting an aggregate filetype. (I don't see this documented anywhere in vim's help files, but it definitely works, and there are a few StackOverflow questions about it.) |
I want to use the plugin with javascript files, jsx in fact.
I'm using https://github.com/mxw/vim-jsx plugin which sets the filetype of
*.js
files to:I've tried to copy
html.vim
under~/.vim/plugged/xmledit/ftplugin
tojavascript.vim
,javascript.jsx.vim
,javascriptjsx.vim
andjsx.vim
to no avail.Otherwise the plugin works on html and xml without a problem.
The text was updated successfully, but these errors were encountered: