Default lack of indentation with classes & switch statements

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Why does the Visual Studio editor fail to indent cases under switch statements and public/private/protected in class definitions? I've been working with Visual Studio since 4.x and it's always been this way. I thought I'd get used to it, but the failure to indent these lines does nothing but make unreadable and sloppy looking code. I always override this behavior when writing switch statements and defining classes, but I still run into this lack of formatting when viewing auto-generated code and code from others who aren't bugged by this default behavior. Why after all these years hasn't this been corrected or at least made into a formatting option?
 
Why does the Visual Studio editor fail to indent cases under switch statements and public/private/protected in class definitions? I've been working with Visual Studio since 4.x and it's always been this way. I thought I'd get used to it, but the failure to indent these lines does nothing but make unreadable and sloppy looking code. I always override this behavior when writing switch statements and defining classes, but I still run into this lack of formatting when viewing auto-generated code and code from others who aren't bugged by this default behavior. Why after all these years hasn't this been corrected or at least made into a formatting option?

How can you "correct" something that isn't wrong?

The funny thing is that their IDE doesn't let you configure the
indentation style to whatever your in-house style happens to be -
you're stuck with Microsoft's in-house style (which you seem to object
to more than most). Most other decent IDEs have fully configurable
indentation. The single and only indentation style option I can find
in VC.NET is "indent braces".

So you could use another IDE or text editor. Emacs gives you lots of
configurability I believe.

Tom
 
Back
Top