Geeks With Blogs
Jonathan Starr's Blog Thoughts on C#, Ajax, WCF, LINQ, Agile et al.
improve my => 'code'

I do this quickly now with a free tool from Meridium made available by the good people at CodeProject.com (1000 Thanks)

http://www.codeproject.com/csharp/documentatormacros.asp

Follow the directions to install (I appreciate the fact that the tool works without problems with Resharper), and just click on the method for which you want to add regions, and type <control> + d.  It even tries to add comments, but will not interfere with you previous comments made (nice!)

The two other shortcuts I love are:

Expand All Regions: <control> + <shift> + <+> 

Condense All Regions:<control> + <shift> + <->

These commands are so much better than Outlining -> Toggle All Outlining command in Visual Studio as that command toggles the structures inside regions as well (which I find annoying).

Hope this helps!

Jonathan

Tools   Print   Email   Del.icio.us   Digg   reddit Posted on Sunday, November 18, 2007 3:52 PM C# | Back to top


Comments on this post: Ever want to add regions to your .NET code quickly?

# re: Ever want to add regions to your code quickly?
Requesting Gravatar...
I don't program on the toilet so I'm pretty sure that key combination won't work.
Left by Scott Kuhl on Nov 18, 2007 8:51 PM

# re: Ever want to add regions to your code quickly?
Requesting Gravatar...
thanks for bringing this up! (post has been corrected so that shift is spelled correctly.)

Left by Jon on Nov 18, 2007 9:39 PM

Your comment:
 (will show your gravatar)


Copyright © Jonathan Starr | Powered by: GeeksWithBlogs.net