Formatting of switch statement
c++, indentation, visual-studio-2013
Solution
I went into VS2013 and created a new project and just tried making a really simple `switch` but it formatted correctly for me, even with the curly braces. Are you able to post that set of code?
The only other thing I can think of is maybe a setting on how braces are set up, but I don't know why that would affect it. (Nor do I think there is really even a setting for that for C++...) Other than that though you could try just not using the braces at all since you are inside a `case` statement, you don't technically need them.
Other than that something may have happened during installation. So re-installing is an option too.
EDIT: Also, could just go with it and finish the code and then when finished just highlight the rows and un-indent ([SHIFT]+[TAB]) them back to their correct spot.
Problem
Say I have my cursor position to the right of a right facing case curly brace, like so: Now, if I press enter, I expect it to auto align the cursor two tabs in, just like the `break` statement. But what it does is this: It adds a ridiculous five tabs! Knowing that Visual studio has a metric ton of settings, I navigate to `Tools::Settings::Text Editor::C/C++::Formatting::Indentation`, and see the following window: But changing the highlighted options in any combination actually doesn't affect the indentation at all! None of the other options seem to apply to switch statements, so I don't know what to do. How do I make it not indent 5 spaces, without disabling auto formatting? And I might add, it not only places 5 tabs when I press enter at the end of the curly brace, but when any auto format event takes place. So when I add a semicolon at the end of a line it places 5 tabs even if I had taken them out before.