First of all, no CTRL+M, CTRL+O is not the answer. For me, this is collapsing #Region, ///Comments, and Methods and I hate that.
I'd like to collapse/expand ONLY #region
sections. I am using Visual Studio 2012 and Resharper.
How to Collapse All Source Code in VS Code? To fold all top-level and child elements of your code: Enter command >fold and hit enter.
Right-click the item, click Expand/Collapse, and then do one of the following: To see the details for the current item, click Expand. To hide the details for the current item, click Collapse. To hide the details for all items in a field, click Collapse Entire Field.
ctrl+m, ctrl+s will collapse the current region. You can select multiple regions manually and collapse them that way.
Since the command "Collapse all open region" doesn't exist, you could always try to create a new one; In that case, check out this post: How to add commands to Visual Studio 2012?
You can't collapse just regions, but the shortcut key chord: ctrl+m, ctrl+l will do it for everything.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With