Haml Syntax Highlighting for gedit

by Ardekantur

I have created very rudimentary syntax highlighting for Haml in gedit. It’s really not worth going much further with it because 1) there’s no documentation on the highlighting format and 2) the next version of the highlighting format is making its way up to stable.

It requires registering the fake mimetype x-haml, which if you don’t know how to do, should check your distribution’s documentation. In Ubuntu I download the MIME type XML into /usr/share/mime/packages and run update-mime-database /usr/share/mime (all as sudo, of course). Then place the haml.lang highlighter into ~/.gnome2/gtksourceview-1.0/language-specs/.

Here are the files:

Have fun.

EDIT I have uploaded version 1.2 of the highlighting file.

Version 1.2 Changelog:

  • Added Single Line Comment
  • Added Filter
  • Fixed Doctype to accept blank preprocessors