JR syntax highlighting in gedit

There were no syntax highlighting for the programming language JR in gedit, so I wrote one myself.

This will work for Ubuntu 9.10, but it may work for others as well.

How to install:
1. Download jr.lang.
2. Place it in either




3. Download jr.xml.
4. Place it in (create it if it doesn’t exist yet)


5. Update the mine database:

cd ~/.local/share
update-mime-database mime

All done! You should now get JR syntax highlighting when opening .jr files in gedit.

Note: The directory paths are based on an Ubuntu system and might be different for other distributions.

Alternatively, you can just run this script to install it automatically:

wget -O jr.lang http://files.kerola.nu/?file=gedit_jr_syntax_hl/jr.lang
wget -O jr.xml http://files.kerola.nu/?file=gedit_jr_syntax_hl/jr.xml
mkdir -p ~/.local/share/gtksourceview-2.0/language-specs
mv jr.lang ~/.local/share/gtksourceview-2.0/language-specs/
mkdir -p ~/.local/share/mime/packages
mv jr.xml ~/.local/share/mime/packages/
update-mime-database ~/.local/share/mime

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>