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:
mkdir -p /Library/Application\\ Support/TextMate/Bundles cd /Library/Application\\ Support/TextMate/Bundles svn co http://macromates.com/svn/Bundles/trunk/Bundles/Ruby%20Haml.tmbundle/ osascript -e 'tell app "TextMate" to reload bundles'
The bundle does not include any Snippet Syntax, Macros or Commands shortcuts, I think syntax highlighting is good enough for now :)
For more:
- Haml Syntax Highlighting page in the Haml google group.
- Bob Aman has also created another Textmate bundle, you can find it on his blog.