The biggest feature your editor is missing

October 14th, 2007

There’s a simple, powerful, and important feature that every text editor and IDE I’ve come across is lacking: alignment.

Alignment means “indent until the next character is in the same column as aligned columns in adjacent rows”. Visually, it means this (where . signifies “align”):

Is displayed like this:

The character following the “align” character is in the same column in each line. If another line were added, the alignment should be adjusted automatically:

Alignment can be used for multiple columms:

This would help get rid of coding style issues; we could eliminate internal tabs. So why doesn’t your IDE have this feature? It’s probably because there’s no ASCII value to represent “align”, so how should the editor save it? One option is to save as spaces.

That what elastic tabstops does. It interprets internal tabs and spaces as alignment when loading and goes back to spaces when saving. This way, editors without elastic tabstops will still show the alignment properly (watch the screencast). Unfortunately, there’s no Visual Studio or Notepad++ plugin.

But after watching their screencast, I’m surprised no IDE has implemented it natively. With all the editor enhancements we’ve been getting, you’d think something like this would be included.

One Response to “The biggest feature your editor is missing”

  • Nick wrote:

    To clarify, the elastic tabstops functionality uses tab characters, not spaces (play with the Java applet at http://nickgravgaard.com/elastictabstops/#tryitrightnow). The Gedit plugin however lets users convert their files to use spaces when they save files and vice versa which is handy if you have to work on a project which uses spaces.

Leave a Reply

Name

Website

Comment