问题
it is very annoying to collapse all one by one...
回答1:
Like Steve said, CTRL + M plus CTRL + L for collapsing all regions recursively. This one is a toggle, meaning you can do it again to re-open them.
Do CTRL + M plus CTRL + O to collapse all regions non-recursively.
Source: http://weblogs.asp.net/mrdave/archive/2004/09/17/230732.aspx
回答2:
Quickest way will be to collapse to definitions via Ctrl+M, Ctrl+O. That will collapse all code down to the signature lines.
回答3:
Collapsing and Openning
recursively: Ctrl+M+LJust
Collapsing
: Ctrl+M+OJust
Openning
: Ctrl+M+P
回答4:
right click -> Outlining -> Collapse To Definitions
回答5:
CTRL + M, CTRL + L
This will also collapse anything that is collapsible too, such as scopes defined by braces.
来源:https://stackoverflow.com/questions/1569244/how-can-i-collapse-all-regions-and-methods-in-c