-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
commenting in html/jsp file #9
Comments
Maybe you would be interested in http://github.com/tomtom/tcomment_vim |
That's fairly nice; however it can't take a # like commentary, and it seems to add more mappings than commentary. |
This sounds handy, but really, really complicated to implement, and I'm pretty convinced it wouldn't be worth it for just this one use case. |
To elaborate a bit, the sole purpose of commentary is temporarily commenting out code. In the jsp/php/erb case, you can use Also, I'd argue that dumping big chunks of JavaScript directly into an HTML document is poor form, but that's just my opinion, not commentary's. |
I wrote a small plugin that piggybacks on the syntax highlighting groups to automatically change the value of commentstring. So far seems to work well for me, and it's really simple and customizable (or so I hope, my knowledge of VimL is pretty small). I hope @tpope can give it a look, since I mostly wrote it for being used with commentary, and I really want to learn more vim script. :-) Feel free to be blunt! |
For the benefit of others who come across this issue: In Issue #60, @vheon has some solutions, most notably inline_edit.vim |
The other use case is Vue.js single file components which have JavaScript, HTML and CSS all in one file (with .vue extension). I'm working on them now and have problems with commenting stuff using this plugin. caw plugin uses something called context filetype. |
i believe suy's plugin works for this now |
@robertjk do you think caw is better than this plugin for commenting? I'm wondering which one to use. |
@himat I'm using vim-commentary right now. caw felt too complicated for me. This plugin is super simple and does everything I need other than context comments. caw on the other hand has context comments, but other than that does the same than this plugin only using a lot more commands and keybindings which I found overcomplicated. |
Is it possible to configure commentary to use
//
or/**/
inside<script>
tags in html files and<!-- -->
elsewhere? If so, it'd be nice to have this kind of thing in jsp/php/erb files as well.The text was updated successfully, but these errors were encountered: