1

Sometimes I run in a source file in Visual Studio (in my case 2010) and I see so many regions which I have to click on + sign to open them up one by one!

Is there any shortcut or menu option to make this easier for me and do it to all of them?

Thanks, Amit

amit kohan
  • 1,612
  • 2
  • 25
  • 47

4 Answers4

3

CTRL + M,O collapses all regions and CTRL + M,L expands all regions.

If you're on the exact line you want to expand/collapse, it's CTRL + M,M

Steve Danner
  • 21,818
  • 7
  • 41
  • 51
1

You can Right Click -> Outlining -> Toggle All Outlining.

Inisheer
  • 20,376
  • 9
  • 50
  • 82
0

Collapse => ctrl+M, ctrl+O

Open => ctrl+M, ctrl+P

jtimperley
  • 2,494
  • 13
  • 11
0

Booyah!!

Visual Studio - Command to collapse all sections of code?

CTRL + M + O will collapse all.

CTRL + M + L will expand all.

CTRL + M + P will expand all and disable outlining.

CTRL + M + M will collapse/expand the current section.

These options are also in the context menu under Outlining.

Community
  • 1
  • 1
GrayFox374
  • 1,742
  • 9
  • 13