Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i get HAML comments to work correctly in Sublime text 2

Tags:

sublimetext2

Comments should be -# not / since we don't want this code to be shown to the user

like image 536
montrealmike Avatar asked Sep 04 '12 16:09

montrealmike


2 Answers

Found the solution:

1) Install the textmate bundle https://github.com/phuibonhoa/handcrafted-haml-textmate-bundle

I think this can be done via the package manager, i just used

git clone git://github.com/phuibonhoa/handcrafted-haml-textmate-bundle.git Haml.tmbundle

in the packages folder

2) Delete all files starting with Ruby Haml in the Packages/Rails folder

3) Restart sublime

like image 172
montrealmike Avatar answered Oct 12 '22 11:10

montrealmike


You can change your RubyHaml comments preference.

Preferences > Browse Package > Rails > Ruby Haml Comments.tmPreferences and edit TM_COMMENT_START from \ to -#

Unfortunately this is limited to scope to <string>text.haml</string> and doesn't use haml comment/uncomment consistently.

like image 36
James EJ Avatar answered Oct 12 '22 11:10

James EJ