Hacker News new | ask | show | jobs
by indentit 1643 days ago
Have you had any thoughts about how to improve the indentation engine ST uses to handle the common "switch"/"case" statement style? As I understand, it would mainly require a way to unindent 2 levels at once when typing the closing brace (or just getting it to match the open brace line/position) and for the first `case` to not unindent, just the later ones (which to be fair, may already be possible with some creative meta scoping and tmPreferences fun, though perhaps just not easy to maintain).

e.g.

switch (something) {

    case one:

        return;

    case two:

        foo();

        break;

}