Scott Dorman

ephemeral segment

  Home  |   Contact  |   Syndication    |   Login
  603 Posts | 10 Stories | 862 Comments | 51 Trackbacks

News


Post Categories

Image Galleries


Microsoft Store


Creative Commons License



Locations of visitors to this page

Subscribers to this feed

TwitterCounter for @sdorman

View blog authority

Add to Technorati Favorites

Windows Live Alerts

AddThis Social Bookmark Button

LinkedIn profile

Community Credit profile

The Code Project

Follow me on Twitter

Get Free Shots from Snap.com

Community Credit Hall of Fame

Get Feedghost

Xobni outlook add-in for your inbox



Support This Site

Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

If you write .NET code using Visual Studio 2005 or 2008, you’ve probably noticed the automatic outlining the IDE makes available to you. This automatically creates collapsible sections in your code for comments, regions, functions, properties, namespaces, classes, and the using block.

image

While this is a great feature and one that I use on a daily basis, it would be great if this extended to automatically outlining control structures, such as if/then, while loops, for/foreach loops, try/catch blocks, etc.

The purists out there might argue that if you need this collapsibility then your code is too long…and they are probably right. However, the purist point of view is not always a pragmatic one. There are numerous times where being able to collapse a long try/catch block or a large case statement would have been very helpful.

If you want to see this feature added to an upcoming release of Visual Studio, be sure to vote for the feature request on Microsoft Connect.

posted on Monday, June 16, 2008 11:32 PM

Feedback

# re: Visual Studio Feature Request – Statement Outlining 6/20/2008 7:12 AM Darren Hall
I agree and for now I use regions to surround long case statements or sections of code that perform a particular function.

# re: Visual Studio Feature Request – Statement Outlining 8/6/2008 12:19 AM Jonathan
If i read you right, you should be able to do it already.
Go to tools->options->text editor->c/c++->formatting and check "automatic outlining of statement blocks". It's not enabled by default.

# re: Visual Studio Feature Request – Statement Outlining 8/6/2008 4:47 AM Scott
Jonathan, I believe that will work but only for C/C++ files. The C# formatter doesn't support this option.

# re: Visual Studio Feature Request – Statement Outlining 9/3/2008 6:19 PM Frank Hali
Agree whole heartedly; use it all the time in C and miss it in C#

# re: Visual Studio Feature Request – Statement Outlining 1/20/2010 10:56 AM someone
I totally agree.
Please Microsoft implement this solution.

# re: Visual Studio Feature Request – Statement Outlining 4/16/2010 12:08 AM Chris Halcrow
Get CodeRush Xpress - it does this

http://msdn.microsoft.com/en-us/vbasic/ee663901.aspx

# re: Visual Studio Feature Request – Statement Outlining 4/16/2010 12:09 AM Chris Halcrow
Small correction - it doesn't do collapsing, but *will* outline code structures like 'if' statements

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: