Installing HAML bundle for TextMate


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.

cd /Applications/TextMate.app/Contents/SharedSupport/Bundles

Then check out the TextMate bundle from MacroMates’ bundle repository:

svn co "http://macromates.com/svn/Bundles/trunk/Bundles/Ruby Haml.tmbundle"

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.

Haml tabbing

Technorati Tags: , ,

Share if you like:
  • Digg
  • StumbleUpon
  • del.icio.us
  • Technorati
  • Ma.gnolia
  • Reddit
  • description

Comments (8)

  1. thomaskay wrote:

    Fantastic. I already had the bundle installed, but I just hadn’t realised that tabbing could be changed that easily.

    Thursday, June 7, 2007 at 2:05 am #
  2. bitbutter wrote:

    I had to checkout with the following url:
    svn co “http://macromates.com/svn/Bundles/trunk/Bundles/Ruby Haml.tmbundle”

    Friday, September 7, 2007 at 1:17 pm #
  3. borafina wrote:

    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.

    Thursday, September 20, 2007 at 12:03 pm #
  4. borafina wrote:

    Oops…forgot to add the quotes. Thanks.

    Thursday, September 20, 2007 at 12:05 pm #
  5. Barry wrote:

    Fantastic. Haml away everyone!

    Thursday, September 20, 2007 at 12:16 pm #
  6. Carl Mercier wrote:

    For clarity, please update the article to reflect the new url:

    http://macromates.com/svn/Bundles/trunk/Bundles/Ruby%20Haml.tmbundle/

    Tuesday, September 25, 2007 at 1:43 pm #
  7. There’s an easier way :)

    sudo gem install bundlemate
    bundlemate install “Ruby Haml”
    bundlemate install “Ruby Sass”

    :)

    Thursday, January 10, 2008 at 7:03 pm #
  8. Ivan wrote:

    Worked perfect.

    Color changes everything!

    Friday, July 4, 2008 at 11:20 am #

Trackback/Pingback (1)

  1. Suave’s Blog » » use Haml in Textmate on Friday, December 7, 2007 at 5:11 am

    [...] 可以参考下这篇blog [...]