In sublime command + / is not working for me to comment out erb and also can't block comment out erb + html, does anyone know how to fix this, maybe a package?
For example, I want to comment out this code in sublime:
1 <% post.categories.each do |category| %>
2 <%= category.name %>
3 <% end %>
I can not just "command + /" or "command+option+/" for the selection because either of those only puts a regular style html comment around the selection. If I try commenting out just line one with command + / it puts a pound symbol # before the line - a ruby comment, not erb.
Instead to comment it out I will have to put a pound sign in the first line, then put a pound sign in the second line and an html comment around it, then put a pound sign in the third line.
So finally it will look like this
<%# post.categories.each do |category| %>
<!-- <%#= category.name %> -->
<%# end %>
I have HTML(Rails) selected.
Make sure you followed the steps at this github link given in rails tutorial. package installing and editing the keys are clearly explained there.
using SublimeERB plugin you can toggle between different erb tag modes including comment style.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With