My switch/case blocks (in Java, for example) normally look something like this:
switch (foo) { case A: bar(); break;
default: baz(); }
Note how the lines after "case" and "default" are indented. (They're not flush with the line above.) I believe this is a pretty standard formatting convention.
However, it seems that TextMate doesn't know about this convention. If, for example, you were to type the above snippet, typing "case A:" and then hitting Return puts the cursor flush with the line above, rather than indented. Likewise, if you were to take the above snippet, copy some random text (that has a different indentation), then paste it between the "case A" and "bar" lines, TextMate's smart- indent feature makes the pasted text flush with "case A", rather than indented.
Considering that TextMate is smart about indentation in many other ways (such as when you type "{" and then hit Return), I was hoping it could be smart about indenting switch/case blocks, too. Is that possible? Perhaps there is something I could add to the language definition? Thanks,
Trevor