Sublime Forum

Haml Comment Suggestion

#1

I think that the default line comment when editing *.haml files should be “-#” instead of “/”

Reason being, anything commented with a “/” is output as “” HTML comments, and sent to the browser.

Given that you’d probably want to keep this in the Ruby side, and not emit it to the HTML (when commenting out potentially sensitive code), I would just always make the default the “Ruby way” of a dash, to switch into Ruby mode, and then the hash, to comment out the rest of the line.

Here’s an example of that style of comment…

cl.ly/3Y391h1u331C033Z3Y3P

And here’s the necessary change to the “Ruby Haml Comments.tmPreferences” file (line 17). Just change “/” to “-#”…

cl.ly/2y1u35060u1Y1T3G3O1M

— And you’re all set. :smile:

0 Likes

#2

Found this thread from a Google search and just wanted to pop in and say thanks, since this is exactly what I was looking for. Keep making the internet a better place.

0 Likes

#3

I’ve done this but it still gives me the old / style. Could there be anything else overriding this?

0 Likes