I Hate #Regions

Free

Regions Suck. You need this.

(40) Review
Visual Studio
2012, 2010
Download (9,909)
9/23/2012
1.2.6
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (40)
Q and A (10)
Sign in to write a review
Sort by:

by SWoker | April 10 2014

by M.Rybnikov | February 25 2014

Owesome!

by Sean Kearon | January 08 2014

Support for 2013 would rock! :)

by GrahamClark_uk | January 06 2014

This is such a great extension. A version that works with VS 2013 would be simply splendid. Thanks!

by kms.on.net | October 24 2013

kudos!

by Moily | October 11 2013

Amazing work.

by jeremy j simmons | October 09 2013

You sir, are a saint. There is a special place for you in my heart. Words can hardly express how much grief and anguish you have saved me.

by Mark Lysaght | August 26 2013

I - absolutely - DESPISE regions. Each time I see one I feel the visual equivalent of a kick in plums.

It's not pleasant.

THANK YOU SO MUCH FOR THIS EXTENSION . . . sorry for shouting but it has changed my life, and has arguably extended the lifespans of some of my colleagues.

by _Mike_W | August 14 2013

Great extension! I hardly notice the regions are there.

by Matt Hickford | August 06 2013

by Nathan Going | June 28 2013

by KennyGoers | June 13 2013

I love you, the intense pain #regions cause me is a little lighter because of your fine efforts, I'm tearing up a little...

by SP19 | May 29 2013

by D. Chatterjee | May 20 2013

by NobodysNightmare | May 02 2013

by Shawn Cicoria | March 29 2013

by SirViver | March 29 2013

I love regions, but I hate how they look when expanded, mainly due to the region title text having the same color as regular code and no option to customize, which I find greatly interferes with readability.

With this extension regions are finally the way they should always have been: completely unobtrusive when expanded! Thank you!

by muratdincer | March 04 2013

Thanks

by dso | January 09 2013

by Sohnee | November 15 2012

I love you. I really and truly deeply hate regions and if it were up to me, this code base would be stripped of all regions. Until that happens - this extension will stop me from exploding!

I wish I had found it earlier!

http://www.stevefenton.co.uk/Content/Blog/Date/201006/Blog/The-Dot-Net-Campaign-Against-Regions/

Shanewho November 15 2012
| Edit |
Delete

Ha! Share the love and tell all your region-hating friends!

1 - 20 of 40 Items   
Sign in to start a discussion


  • Regionizer
    3 Posts | Last post January 07, 2014
    • I am completely the opposite of you. I love Regions as they are the cure for spaghetti code.
      
      My product, Regionizer, available at http://regionizer.codeplex.com formats C# code files into regions for private variables, methods, events and properties.
      
      The events, methods and properties are all alphabetically sorted so you no matter the coding style of anyone on your team, the documents are all formatted the same way.
      
      I can't stand code that ins't formatted using Regionizer, so to each their own, but if you like regions, you will like Regionizer.
      
      The only thing I could not figure out was how to expand and collapse all regions using the DTE, if you know of a way please tell me.
      
      I would like you to compare my source code to yours and you tell me if you like your style better after using Regionzer.
      
      Download Rad Studio Code Generation Toolkit (http://radstudio.codeplex.com) to see a sample of code formatted using Regionizer.
      
      Data Juggler Software
      Houston, Texas
    • The cure for spaghetti code is to refactor!  Get R# or Refactor and go to town on that large file.
    • If you have to use regions, your code is spaghetti
      Good code short and does not need regions
  • Same plugin for "this" keyword
    1 Posts | Last post January 07, 2014
    • I hate "this" keyword and some times people use it
      May be it is posible to hide it in editor
  • Visual Studio 2013 support
    3 Posts | Last post October 17, 2013
    • Hi. Please support Visual Studio 2013!
    • This will be done soon. In the meantime, you can try the suggestion below (using vs12), it worked for 2012 but haven't tried it for 2013:
      
      AlbertWeinert - Download the vsix file, change the manifest and add vs11, also change .net framework max to 4.5. Install over the "new" vsix. Works.
      
    • That worked perfectly. For lazy people, download an updated version for VS2013 here: https://dl.dropboxusercontent.com/u/3006713/DisableRegions.vsix
  • Shortcut for this feature
    2 Posts | Last post August 23, 2013
    • Hi I like your extension very much. I only miss a shortcut. When I open a class or when I have opened a lot of methods I want to organize my code again. I then hit Ctrl M + Ctrl O. The only thing that I hate then is that the regions are also closed. Can you make a shortcut that does the same thing as Ctrl M + Ctrl O but expands the regions.
      
      Thanks!
    • Have you tried Ctrl M + Ctrl L? Also, in Tools -> Options -> C# -> Advanced, do you have 'Enter outlining mode when files open' checked?
  • Add support for hiding XML comments
    1 Posts | Last post August 14, 2013
    • I nearly crapped in my pants when I saw this.  Great job!  If only I could convince everyone else on my team that regions are a code smell.  If the file is so big it needs organization, then break up the functionality.  
      
      Now that you tackled regions, how about XML comments on functions?  I just want to see code!  Again, great extension.
  • Is there a changelog?
    3 Posts | Last post March 13, 2013
    • Maybe I'm just not seeing it as I don't interact with this site much, but is there a changelog for 1.2.5 to 1.2.6?
    • No changelog, but the only change was the ability to install in VS2012.
    • Good to know, thanks.
  • Exactly opposite behaviour
    2 Posts | Last post October 06, 2012
    • Hi, it is a great extension indeed, but i need exactly opposite functionality - I want to automatically collapse everything in the file on open. For instance, when I hit Ctrl+T (Resharper, navigate to type) and select some type a file with that class definition is opened and everything in that file should be collapsed except the "class MyClass" node.
      How can I achieve this?
    • Hiya, that behavior is exactly what this extension is trying to prevent, haha. So you won't be able to do it with this one, but maybe there is another tool that will help? You could also write your own extension, all of the functionality is included in the Visual Studio 2010/2012 SDK APIs.
  • Extension throws Exception if "Annotate" is used
    10 Posts | Last post October 03, 2012
    • Hi.
      Thanks a lot for this great Extension.
      
      I have one problem with it. If I open a file and use the "Source Control" - "Annotate" Command from the ContextMenu an Exception is thrown, causing a popup message from VisualStudio.
      
      The Exception is:
      System.NullReferenceException: Object reference not set to an instance of an object.
       at ShaneBlazek.DisableRegions.TextViewHandler.TextViewClosed(Object sender, EventArgs e)
       at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent(Object sender, EventHandler eventHandlers)
      
      I hope this helps to fix the problem.
      Thanks.
    • Thanks for the feedback! I see what is happening and I'll try to get that fixed in the next few days. I'll let you know as soon as it is updated.
    • Ok, I can't reproduce this, but I've updated some code that *should* fix it (based on the call stack you posted). When you get a chance, update to the latest version and let me know if that solves your problem. Thanks!
    • Hi
      
      Thanks for your update.
      It didn't fix the issue, but the StackTrace is now different. The new StackTrace is:
      System.NullReferenceException: Object reference not set to an instance of an object.
        at ShaneBlazek.DisableRegions.TextViewHandler..ctor(IWpfTextView textView, IOutliningManagerService outliningManagerService)
        at ShaneBlazek.DisableRegions.TestViewCreationListener.TextViewCreated(IWpfTextView textView)
        at Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.<>c__DisplayClassd.<BindContentTypeSpecificAssets>b__a()
        at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call)
      
      and it seams that the IOutliningManagerService is null. Maybe this is the case because the Annotate View doesn't support Outlining (at all) but looks like a normal TextView.
      
      I hope this helps.
      
      ddpommes
      
    • Ok, next attempt at fixing this is online, so you should be able to update. I *can* open annotate view and everything seems to still work, so unfortunately I can't reproduce to verify the fix. Maybe different TFS versions? Anyway, if you have time, let me know if it works or not. Thanks again.
    • I still have the same exception (with the same StackTrace).
      Since the message box in VisualStudio opens only for the first exception of an extension I think I can live with that. The benefits of this extension still outweigh this one little popup message. :-)
      Thanks anyway.
    • Ok, thanks for the help. I thought it was crashing Visual Studio, so that is better at least. I did just update a new version with some more null checks anyway, so it might be fixed now.
    • Great. The problem seems to fixed now. No more MessageBox. Thanks.
    • I get 
      
      System.NullReferenceException: Object reference not set to an instance of an object. at ShaneBlazek.DisableRegions.RegionLineTaggerProvider.CreateTagger[T](ITextView textView, ITextBuffer buffer) at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.GatherTaggers(ITextBuffer textBuffer)
      
      any file that I open.
    • @regisbsb - What version of Visual Studio are you using (2010, 2012, Express/Premium/Ultimate/Etc)? Are you using the Annotate function or just opening a normal file? What is the extension of the file you are opening?
  • Visual Studio 11 support
    7 Posts | Last post September 23, 2012
    • Is there any plan to port this to VS11? I'm really surprised that this very useful feature wasn't integrated in the IDE.
    • Yep! It is definitely coming to VS11, but I don't know when yet. I'll try to get it ported soonish. I'll let you know once it is done.
    • Download the vsix file, change the manifest and add vs11, also change .net framework max to 4.5. Install over the "new" vsix. Works.
      
    • Just an update on this, I plan to get this upgraded as soon as vs11 is released (later this month, I think). I have been waiting for the RTM version before installing. Until then, you can use AlbertWeinert's workaround.
    • Please, please, please add support for VS2012!
    • @AlbertWeinert that worked for me once I figured out the vsix file was really a zip! Thanks..
    • Now supports VS2012!
  • Configure tool
    3 Posts | Last post April 06, 2012
    • Hello. Can you add configuration option which block changes color and font size of lines with #region and #endregion. I need tool which automatically expand regions, but without losing view of the beginning and end of each region.
    • There are options for this extension, but they aren't easy to find.  If you go to Tools->Options, there is a category added in the options tree called "Disable Regions".  In there you can set "Style Region Lines" to False which will cause the extension to stop making the regions harder to see by not making them smaller and gray, but it will still auto expand them.
    • Thank you very much! ;)