Smart Indent options in VC6 vs. VS .NET

Smart Indent options in VC6 vs. VS .NET

Post by jimjun » Wed, 11 Feb 2004 07:48:33

VC++ 6.0 supported two Smart Indenting options:
"Indent Open Brace" and "Indent Closing Brace"

It appears that these options are no longer supported in Visual Studio
.NET. Although I'm certain I could replace the default Smart Indenting
with my own (e.g., Active State has done it for their Visual Perl
library), I can't find any documentation on how to do it.

My team's code base uses the "indented braces" style of formatting and
we are loathe to switch at this point -- we have over 200k lines of
C++ code. This is keeping us from moving our development to VS .NET.

Is there any way to get the previous behavior in VS .NET?
Alternatively, is there any documentation on how to replace the Visual
Studio smart indent routines with one of my own?

-- Jim

P.S., Here is the style of indenting my team uses:

main ()
if (getchar() == ' ')
printf("You pressed space.\n");

We find it easier to manage because the braces are lined up with the
code they contain.

Smart Indent options in VC6 vs. VS .NET

Post by david.adam » Wed, 11 Feb 2004 22:17:09

A Strange format not one that I have seen before VS.IDE does auto
indent but uses the format


Try looking under the Edit/Advanced Menu something I use all the time
is to hightlight the document and then use Ctrl K, F which will
reformat it all as above as we have a programmers that use
if (....){