Haml/Saas Syntax Highlighting in Aptana/Eclipse

HamlUPDATE: Some people reported problems while downloading the files. Now, you can download them from here.

Recently, I have been using Haml in some my Rails projects. It simply makes your views clean and readable. One issue I had was syntax highlighting in my favorite IDE, Aptana Studio. The Haml syntax highlighting support has been stopped a while ago and more issues have raised after Aptana recent updates.

After some research, I found a solution posted by Max Kostovetski, a member of Haml Google group. Now, to the steps:

  1. Download the following files to your hard drive:
  2. From Aptana "Window" menu, select "Preferences..."
  3. In the the preferences window, select "Editors" > "Generic Text"
  4. Press "Add..." to add new file extensions: *.haml and *.sass
  5. For each of the new extensions, click it and press "Browse..." to select the proper lexer file (*.lxr)
  6. For colorization, press "Import..." to import the *.col files
  7. Press "OK"
  8. Enjoy you Haml views

Did you like this article? Bookmark it:

Related Articles

Leave a Comment

If you want to post code, do this:
<pre><code class="ruby|javascript|css|html"> your code here </code></pre>