2 min read

Textmate-like Gedit in few steps

UPDATE: A !! new version !! of this guide is avalaible.
UPDATE: This guide was for gedit 2.18.x, please upgrade to gedit 2.20.x to have an easier color scheme managing. Textmate is really a great text-editor (almost an IDE but faster), it has even the support for latest Ruby/Rails technologies like RSpec. On the GNU/Linux side there are also similar full-featured text editor and one is Gedit.

Gedit can be extended by plugins written in C or in Python, here is a tutorial how to set up a Textmate-like Gedit.

Syntax highlight for RHTML, RJS

By default Gedit supports a lot of languages php, C#, java,.. and Ruby, but Ruby embedded. To enable the sintax highlight in HTML files with embedded ruby code (.rhtml) you have to add 2 files (Thanks to Bitsbam).

From the terminal:

$ wget http://grigio.org/files/x-rhtml.xml; sudo mv x-rhtml.xml /usr/share/mime/packages
$ wget http://grigio.org/files/rhtml.lang;  sudo mv rhtml.lang /usr/share/gtksourceview-1.0/language-specs/

Select the plugin you need

The list of the plugins avalaible is growing fast; this is a list of plugins that work well each other.

Snippets: it permits to call structures of code easly and everytime you press TAB the cursor automatically jumps to the right position
Snap Open
: it opens the files that contains the word you are typing

File Browser: a treeview of the files in the current directory
Word completion: it complete the word while you are typing and with TAB you select it

Class Browser: a list with all the methods in the current file
Quick Highlight Mode: very useful to specify quickly the syntax mode

Interesting resources

All the plugins are avalaible from the GNOME Wiki.
If you want User-defined syntax color, snippets, .. you can download them from here

UPDATE: My color scheme is here (It's ONLY for gedit 2.18.x), uncompress it in $HOME/.gconf/apps/gedit-2/preferences/syntax_highlighting  and restart  the session. Be sure that the folder exists and that your previos files are  overwritten.


If you wan to pass HP0-J25 exam with promising success, check out our latest collection of braindump prepared by certified experts plus get free sample questions for 1Y0-A08.