Here's a syntax highlighter for gedit running in Gnome.

it's not perfect, but gnu-regexes are fairly limited in comparison with
what we have in Perl.

Any my mime stuff is probably not the recommended way of doing it.
However, it works for me (at least it does on SuSE 10.1)

I have assigned a made up mime type of text/html+tt, which recognises
files of the pattern '*.tt'. If you want to change this, you need to
edit tt.lang and Overrides.xml.


To use it:
==========
To specify the regexes for gtksourceview:
1) Save tt.lang to /opt/gnome/share/gtksourceview-1.0/language-specs/

To create the mime type:
2) Save Overrides.xml to /usr/share/mime/packages/

To specify the syntax highlighting colours for your user:
3) mkdir ~/.gconf/apps/gedit-2/preferences/syntax_highlighting/TT2/
4) Save %gconf.xml to that directory
5) killall gconf-2

If there are any corrections/improvements, please let me know

thanks

Clint

Attachment: tt.lang
Description: application/xml

Attachment: Overrides.xml
Description: application/xml

Attachment: %gconf.xml
Description: Binary data

Reply via email to