473,486 Members | 2,136 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Default lack of indentation with classes & switch statements

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?
Nov 17 '05 #1
1 1293
On Wed, 12 May 2004 06:56:08 -0700, "Steve"
<st*************@sonic.com> wrote:
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
--
C++ FAQ: http://www.parashift.com/c++-faq-lite/
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
2119
by: Hilbert | last post by:
Hello, I'm using python to output RIB streams for Renderman. The RIB stream is a bunch of statements which describes a 3d image. The Rib standard allows for blocks which we usually indent for...
26
15514
by: Alex Panayotopoulos | last post by:
Hello all, Maybe I'm being foolish, but I just don't understand why the following code behaves as it does: - = - = - = - class listHolder: def __init__( self, myList= ): self.myList =...
3
3165
by: Anoop | last post by:
Hi guys i have a piece of code main() { switch(...) { case 1: {
7
1182
by: Richard Pope | last post by:
I have some existing code that I am trying to upgrade to c++. The data in question is two bytes, which are used to identify what information is requested from an industrial computer (a PLC). The...
5
5220
by: Nils | last post by:
Hi. I ahve three classes A,B,C, where B and C are derived from A. A:>B,C. Furthermore each class has an static int variable with name id, static int id; Besides that the class A implements the...
1
7141
by: chis2k | last post by:
How can I compare objects in a switch statement? For instance: public void textbox1_Select(object sender, System.Eventargs e) { Textbox tx = (TextBox)sender; switch (tx) { case textbox2:...
45
6305
by: Ben Blank | last post by:
I'm writing a family of classes which all inherit most of their methods and code (including constructors) from a single base class. When attempting to instance one of the derived classes using...
74
15865
by: Zytan | last post by:
I have a struct constructor to initialize all of my private (or public readonly) fields. There still exists the default constructor that sets them all to zero. Is there a way to remove the...
19
2077
by: Eric S. Johansson | last post by:
Almar Klein wrote: there's nothing like self interest to drive one's initiative. :-) 14 years with speech recognition and counting. I'm so looking to my 15th anniversary of being injured next...
0
7100
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7126
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7330
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3070
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.