Elastic tabstops - a better way to indent and align code

The elastic tabstops mechanism in Gedit

I have written 2 plugins for Gedit, one that provides the functionality for the main elastic tabstops mechanism, and another that allows users to convert files that use spaces for alignment.

Screencast of gedit with elastic tabstops
Click to watch a screencast of gedit with the elastic tabstops mechanism

Install the ElasticTabstops Python package: sudo easy_install ElasticTabstops

Download the plugins (and optionally the c code for the main plugin).

Extract the files to ~/.gnome2/gedit/plugins

Delete the libelastictabstops.x86_32.so or libelastictabstops.x86_64.so file so the only .so file remaining is the one that matches your machine's processor architecture. Rename it to libelastictabstops.so

Optionally use the following commands to set the minimum width and padding width values:

gconftool-2 --type int --set /apps/gedit-2/plugins/elastictabstops/minimumwidth 32
gconftool-2 --type int --set /apps/gedit-2/plugins/elastictabstops/paddingwidth 8

Activate the plugins in the preferences dialog.

up to nickgravgaard.com/elastictabstops/

The elastic tabstops mechanism was invented by Nick Gravgaard in the summer of 2006. All text and images on this page are copyright © 2006-2010 Nick Gravgaard and licensed under a Creative Commons Attribution 3.0 Licence. This page was first uploaded on 2006-07-02 and last updated on 2010-04-02.