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
Comments
Sorry for the newbie question, but I’m using Ubuntu 8.04 and I don’t have /gtksourceview-1.0/language-specs/ in the ~/.gnome2 directory. Has it changed to something else?
I don’t actually know, I’m afraid. 8.04 might have switched to using gtksourceview 2.0, but that would probably invalidate my syntax highlighting file completely. I will look into it.
In Ubuntu 8.04 i just created the missing gtksourceview-1.0/language-specs/ folder. Prob a v uncool and totally noobish way of doing things but it seems to work.
To make the lang spec to work to all users, copy it to: /usr/share/gtksourceview-1.0/language-specs/
[]’s
Hey I’m using Ubuntu 9.10 and creating those missing folders worked for me.
[...] normal, thanks to you. Perhaps, i should to ask this question on another topic, but i have some …Haml Syntax Highlighting for gedit : ArdekanturI have created very rudimentary syntax highlighting for Haml in gedit. It's really not worth going [...]