Haml syntax highlighting in TextMate

I’ve been using Haml in every project I’ve been working on in the last couple of months. I really encourage every Rails developer to start using it because it really makes your life easier and keep you away from the ugly erb code.

Of course if you are using Textmate, you will immediatly ask for a syntax highlighting bundle. Here’s how we get it installed (Installing Textmate bundles is explained in more details in Textmate manual.

  • Let’s create the textmate bundle directory in case it’s not already there:
    mkdir -p /Library/Application\ Support/TextMate/Bundles

    Or you can create it in your own Library folder:

    mkdir -p ~/Library/Application\ Support/TextMate/Bundles
  • Now cd to the previously created directoy
    cd /Library/Application Support/TextMate/Bundles
  • Checkout the code from the repository:
    svn co http://macromates.com/svn/Bundles/trunk/Bundles/Ruby%20Haml.tmbundle/
  • In case you have Textmate open, run the following the command to reload bundles:
    osascript -e 'tell app "TextMate" to reload bundles'

Here are all the commands together:

Error: Could not open haml_textmate.ssh

The bundle does not include any Snippet Syntax, Macros or Commands shortcuts, I think syntax highlighting is good enough for now :)

For more:

Comments

000

Leave a Reply

you can use these xhtml tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Articles Permanent Link