randy3k/AlignTab — pull request #22 by tarwich (2014-01-24 20:37:45+00:00)
Title: Added live preview feature

Tested in ST3 and ST2.
Resolves feature request #20.

## Feature:
Change the `aligntab_live_preview` setting to `true` in your user preferences to enable preview-as-you-type in the AlignTab expression box. This is especially helpful if you're having troubles forming an expression.

### Implementation:
* I used `aligntab_live_preview` as the setting name in order to make it easier to set in the global user preferences *(which is where I put all my settings)* instead of the AlignTab user preferences.
* The setting will default to false for existing installations, so as not to drive people nuts.
* The plugin uses undo since the change is a command in the history, so every time you press a character it runs `undo`, then `align_tab`. Undo doesn't get run if no change was previously made.
* When you submit the AlignTab expression, there will only be one entry added to the history (not one for every single character entered). This makes it so when using live_preview and submitting the buffer, you can still run undo as normal afterwords.