I Hate #Regions

Free

Regions Suck. You need this.

(46) Review
Visual Studio
2013, 2012, 2010
Download (12,829)
6/2/2014
1.3.0
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (46)
Q and A (12)
Sign in to write a review
Sort by:

by Jake Sisko | August 22 2014

Works great in VS2010 but doesn't appear to function at all in VS2012. Region display was unaffected there.

by icanhasjonas | July 12 2014

Who ever came up with the idea of wrapping every little line of a class in #region should not be allowed on the internet again.

Love the plugin!

by Rory Dev | July 09 2014

by Apple Sauce.CN | June 11 2014

很好用,谢谢!

by StuartDunkeld | June 06 2014

Thanks again for the extension, and thank you for releasing a VS2013 version, saves having to hack the manifest to install it :)

by nick__2 | June 04 2014

Perfect! Region abuse is rampant and obnoxious! Too bad the masses ruined a feature that when used sparingly is great.

by Nicholas Lydon | June 04 2014

This extension cures sick children.

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!

Shanewho June 04 2014
| Edit |
Delete

Thanks! 2013 works now

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

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


  • How to disable small #region lines?
    1 Posts | Last post Sun 7:12 PM
    • This is a great little tool, thanks for making it! One thing that irks me, though, is that this extension causes any #region line to be rendered in a smaller font, which I find distracting. How do I turn that off? (I don't want to turn off #region coloring, which I really like -- I just don't want it to make the font smaller.)
      
      Thanks!
  • Are there any plans to update this for Visual Studio 2013?
    2 Posts | Last post June 02, 2014
    • Great extension!! I love using this extension!!
      
      My organization recently updated to Visual Studio 2013 and this extension is no longer compatible, are there any plans to update this for Visual Studio 2013?
      
      Thanks
    • Now works with 2013!
  • 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?
1 - 10 of 12 Items