Sublime Forum

How do I customize Haml comments?

#1

No matter what I do, I can’t seem to change the Ruby Haml comment character to “-#” instead of “/”

“/” inserts an HTML comment which is output to the page. Not usually what I want.

Any help here? Every time I delete the ~/Library/Application Support/Sublime Text 2/Packages/Haml it reappears later. Where is it coming from?

When I open Comments.tmpreferences, it looks like it has the correct syntax for the comments. Here’s a zip of the folder cl.ly/3U3S1R0L1y2l0W23310N

Thanks

0 Likes

#2

+1 for me on this one. I have the same problem. If you put the cursor in the middle of the HAML line (as opposed to on either end) you get the Ruby comment:

not the HAML comment:

-#

Putting the cursor on either end gets you the ‘/’ type comment.

0 Likes

#3

I’m also interested by this feature…

0 Likes

#4

If you are editing a haml file inside a rails project then you need to edit this file instead
~/Library/Application Support/Sublime Text 2/Packages/Rails/Ruby Haml Comments.tmPreferences

and replace "/ " with "-# "

0 Likes

#5

[quote=“george”]If you are editing a haml file inside a rails project then you need to edit this file instead
~/Library/Application Support/Sublime Text 2/Packages/Rails/Ruby Haml Comments.tmPreferences

and replace "/ " with "-# "[/quote]

I found the file, but edited it and it’s still giving me the /. Could there be anything else overriding this?

I also have a HAML folder inside the Packages folder where I’ve edited the comment but it doesn’t work.

0 Likes