By "current region" I mean a region where the cursor is.
EDIT: I am looking for region toggling, not outlining expansion toggling. By "region" I mean section of code defined by #region
and #endregion
directives. Ctrl + M, Ctrl + M toggles closest outlining (which for most cases would be current method not region).
To collapse an outlining region, double-click any line in the region on the outlining margin, which appears just to the left of the code. You can see the contents of a collapsed region as a tooltip when you hover over the collapsed region.
Collapse All Regions command for #region blocks in C#, VB, C/C++, XAML (and possibly F#) source code files. The default key binding for this command is [Ctrl+M, Ctrl+R] Note: It may also work with F# files, when a #region block handler extension is installed.
Do CTRL + M plus CTRL + O to collapse all regions non-recursively. Ctrl+M,Ctrl+O does collapse the comments and methods inside the regions as well, just nothing on a higher level (like the class or namespace itself).
Ctrl + M , Ctrl + L toggles all foldables recursively, from the top namespace down to the inner methods and comments.
CTRL + M, M should do the trick
By the way you can download a "poster" of shortcuts here
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