Visual Studio Expand/Collapse keyboard shortcuts
This question already has an answer here:
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+
链接地址: http://www.djcxy.com/p/49348.html