I’m working in a C++ file and I’m working with a switch/case block and Sublime Text formats it like this:
[code] switch (thing) {
case type1:
doType1();
break;
case type2:
doType2();
break;
}[/code]
That is to say, that’s how it formats it for me as I’m working on it, and if I highlight the block and choose Reindent, that’s how it formats it for me.
What I want is this:
[code] switch (thing) {
case type1:
doType1();
break;
case type2:
doType2();
break;
}[/code]
That is to say, I want the body of the case blocks to be indented from the left of the case block itself. I don’t see any way of doing this from Sublime Text itself or any of the plugins that I’ve found. I can use SublimeAStyleFormatter to select this block and format it and it will, but when I have to add case blocks, for instance, Sublime Text will left-align the body of the case block with the case statement itself.
Is there any way to fix this via built-in Sublime Text settings or an existing plugin?
Thanks!