Text Columnizer

Neaten your code or lists with columns!
Tagged: tools javascript

In many instances, you can greatly increase readability of lists or source code by aligning elements in columns.

Here is a contrived example:

Before

var green_snake = "hiss";
var cat = "meow";
var grizzly_bear = "grr";
var ox = "grunt";

After

This the the above example after being columnized on the "=" character.

var green_snake  = "hiss";
var cat          = "meow";
var grizzly_bear = "grr";
var ox           = "grunt";

Note: You can columnize on any string (not just single characters). With a little creativity, you can usually coerce columns out of even the trickiest combinations.