How to insert ruby erb comments in html file?

Hi,

I use RM at home and at work. At home, when I am editing an html file and press "Ctrl-/" the IDE inserts a Ruby/Erb comment (<%#  %>) (actually, I use Haml so I think it's -#).

Anyway, at work when I press "Ctrl-/" in an html file the IDE inserts an html comment (<!-- -->).

I've searched the doc and the Settings dialog box and can't figure out how to instruct RM to insert a Ruby/Erb comment instead of an html one when I am editing an html file.

Can someone tell me how to specify this?

Thanks,
Larry

0
3 comments
Avatar
Oleg Sukhodolsky

Hi,

we only hace "Comment with line|block comment" actions and what kind of comment should be added (# - for ruby, <!-- --> for html) decided automatically
so there is no way to change this.  But why do you need this?

Regards, Oleg.

0

Hi Oleg,

Thanks for responding. The IDE does behave differently w.r.t. erb vs. haml: When I'm editing a .html.haml file and hit "Ctrl-/" it inserts a ruby comment but when I'm editing a .html.erb file it inserts an html comment.

The reason I would like to change it is that whenever I add a comment to a view file I almost always (99% of the time) want it to be a ruby one so it does not end up in the generated code in the web page. When I'm editing a haml file all I have to do is press "Ctrl-/" to achieve this; when I'm editing a .erb file I have to type "<%#" which, being all special characters, is slow and a kind of a pain. (I am aware there are many, many, many far more painful things in life, but this is just kind of annoying. I like to comment my code and whenever I add one to a .erb file I kind of have to stop my touch-typing so I can look at the keyboard and start hunting-and-pecking for the special characters.)

Thanks anyway,
Larry

0
Avatar
Oleg Sukhodolsky

The functionality you asking looks reasonable feel free to file a request in our tracker http://youtrack.jetbrains.com/issues/RUBY

Regards, Oleg.

0

Please sign in to leave a comment.