CTRL + M + O will collapse all. CTRL + M + P will expand all and disable outlining. CTRL + M + M will collapse/expand the current section.
Ctrl-Shift-F is used to find all the ocuurance of a string with in entire solution and display find result window as shown below. Ctrl-F is used to find a string in the current document, project and all open documents one by one.
Collapse to definitions
CTRL + M, O
Expand all outlining
CTRL + M, X
Expand or collapse everything
CTRL + M, L
This also works with other languages like TypeScript and JavaScript
As you can see, there are several ways to achieve this.
I personally use:
Expand all: CTRL + M + L
Collapse all: CTRL + M + O
Bonus:
Expand/Collapse on cursor location: CTRL + M + M
Visual Studio 2015:
Tools > Options > Settings > Environment > Keyboard
Defaults:
Edit.CollapsetoDefinitions: CTRL + M + O
Edit.CollapseCurrentRegion: CTRL + M +CTRL + S
Edit.ExpandAllOutlining: CTRL + M + CTRL + X
Edit.ExpandCurrentRegion: CTRL + M + CTRL + E
I like to set and use IntelliJ's shortcuts:
Edit.CollapsetoDefinitions: CTRL + SHIFT + NUM-
Edit.CollapseCurrentRegion: CTRL + NUM-
Edit.ExpandAllOutlining: CTRL + SHIFT + NUM+
Edit.ExpandCurrentRegion: CTRL + NUM+
You can use Ctrl + M and Ctrl + P
It's called Edit.StopOutlining
For collapse, you can try CTRL + M + O and expand using CTRL + M + P. This works in VS2008.
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