There is currently a TextMate bundle in process for the templating language, Haml. It doesn’t come built-in, however. Installation is fairly simple once you figure it out.
(Keep in mind, my TextMate application location may vary from yours. This is simply what I found works for me.)
First, browse to your bundles area in Terminal.
Then check out the TextMate bundle from MacroMates’ bundle repository:
Or if you prefer git:
Then, reload your bundles in TextMate (Bundles | Bundle Editor | Reload Bundles).
Finally, for some reason tabbing isn’t set properly by default when editing a Haml file, which is important for this white-space-aware templating language. Perhaps the expectation is that you will always use your space bar? In any case, after opening a .haml file, look along the bottom bar of the TextMate interface. Be sure the Haml bundle is selected, and change your tabbing to Soft Tabs at 2 spaces per tab.

Update: Here are instructions for installing the Sass TextMate bundle:
svn co "http://macromates.com/svn/Bundles/trunk/Review/Bundles/Ruby Sass.tmbundle"
For both the Haml and Sass bundles, you may prefer to install the bundles in your “personalized” bundle area. Simply replace the cd commands above with:







Comments (18)
Fantastic. I already had the bundle installed, but I just hadn’t realised that tabbing could be changed that easily.
I had to checkout with the following url: svn co “http://macromates.com/svn/Bundles/trunk/Bundles/Ruby Haml.tmbundle”
I see the Ruby Haml. tmbundle but when I try it, I get:
svn: URL ‘http://macromates.com/svn/Bundles/trunk/Bundles/Haml.tmbundle’ doesn’t exist
Is the space causing the issue? Thanks.
Oops…forgot to add the quotes. Thanks.
Fantastic. Haml away everyone!
For clarity, please update the article to reflect the new url:
http://macromates.com/svn/Bundles/trunk/Bundles/Ruby%20Haml.tmbundle/
There’s an easier way :)
sudo gem install bundlemate bundlemate install “Ruby Haml” bundlemate install “Ruby Sass”
:)
Worked perfect.
Color changes everything!
Arrgh. What happened to the Sass bundle?
“The requested URL /svn/Bundles/trunk/Bundles/Ruby Sass.tmbundle was not found on this server.”
That stinks, Jeff. It indeed appears to be gone.
Aussiegeek’s github project looks like a promising mirror.
The Sass bundle is in the Review section:
Watch out for those fancy quotes.
Thanks, Henrik. I’ve updated the post with the new bundle location.
Great, I just installed it, works nice, it was hard to use before the bundle.
Just installed the bundles - makes a big difference when coding HAML and SASS in Textmate, so many thanks for the info.
Thanks Barry. I normally install TM bundles using the gem here http://tinyurl.com/cmqfro, however it is not working at the moment so I used your method and put it into a gist: http://gist.github.com/89632
Hi, I believe the url should now be:
http://svn.textmate.org/trunk/Bundles/Ruby%20Haml.tmbundle/
Yes, the URL appears to have changed. And now that many Textmate bundles are available at GitHub, I’ve added instructions for git.
Trackbacks/Pingbacks (3)
[...] å¯ä»¥å‚考下这篇blog [...]
[...] The TextMate Manual, Bundles Chapter Installing HAML bundle for TextMate [...]
[...] This is more for my benefit of forgetting how to install the Haml bundle for TextMate. (Surreptitiously borrowed from Barry Hess’ blog entry.) [...]