My GEdit Setup

GEdit is the basic text editor which comes with Gnome. For languages like Ruby and Python, I tend to prefer a decent text editor over an IDE. Perhaps soon an IDE will offer enough helpful features for me to get over the bloated feeling I get using one, like Eclipse and Netbeans have for Java. For now, however, I quite often find myself in a stripped down text editor.

When I was writing the Google App Engine version of dx13, I chose to use GEdit on Ubuntu. Whilst I’m moderately skilled with VIM, I like GEdit’s simplicity. I needed to make a few tweaks to the default set up—a different colour scheme, an extra syntax highlighter and a few plugins—but the end result was very comfortable to work in. Here’s a peek:

My GEdit setup

Theme

I tend to prefer dark colour schemes, with Vim’s Desert as my all time favourite. There are several dark colour schemes for GEdit, but I was very happy to find a port of Desert to use.

Highlighters

GEdit comes with decent python, HTML, JavaScript and CSS syntax highlighters, and it wasn’t hard to find a mako one for templating. GEdit supports highlighting multiple languages within the same source file, which is great for templating languages which intersperse programming language into their templates like mako does.

I had to make a slight alteration to the mako language file to enable support for python in <%! ... %> in addition to <% ... %> blocks. Change line 43, in the embedded-python-block-ltgt context, from:

to:

Plugins

Here it becomes more personal. I installed the default extra plugins Ubuntu provide with the command:

From these, I use the python console, file browser, session saver and commenting plugins. There are many other plugins listed on the GEdit wiki page. I use the SnapEdit and Python Indentation plugins from here; I’ve found they work well while some of the others I tried were a bit flaky.

There you have it. It took an hour or so, but I like to think it was worth my time.

It seems the GEdit customisation scene isn’t a patch on VIM or Emacs, but there’s plenty about if you dig about a bit. You can even use Python as a plugin language for GEdit, making it simpler than you’d imagine to extend the editor. Thankfully, however, I didn’t have to venture into that territory this time around.

.:.