The AlignTab plugin allows you to select a bunch of code and automatically align it on some arbitrary characters. Just choose AlignTab from the command palette (CMD + SHIFT + P) and you’re good to go.
Here’s an example of aligning on definition:
And another on aligning on case matches:
Wouldn’t it be nice if you could preview the alignment before actually committing to it? Well you’re in luck with the Live Preview Mode you can do just that:
Another nifty alignment is Table Mode. If you are writing a wiki-style table, this alignment automatically formats headings, columns and rows for you at application time and from then on. It also aligns any other tables you create on the page with the first table.
One caveate is that you need to escape the pipe symbol (|) (because it’s a regular expression) with a backslash before using it as a formatting character.