Command to collapse all sections of code?

2019-01-02 19:19发布

In Visual Studio (2008) is there a command to collapse/expand all the sections of code in a file?

19条回答
爱死公子算了
2楼-- · 2019-01-02 19:29
  • Fold/Unfold the current code block – Ctrl+M, Ctrl+M
  • Unfold all – Ctrl+M, Ctrl+L
  • Stop outlining – Ctrl+M, Ctrl+P
  • Fold all – Ctrl+M, Ctrl+O
查看更多
心情的温度
3楼-- · 2019-01-02 19:29

CTL + M + A collapses all

works for me, whereas

CTL + M + O

does not

查看更多
路过你的时光
4楼-- · 2019-01-02 19:29

Collapse All - Ctrl + M + O

Expand All - Ctrl + M + L

查看更多
无色无味的生活
5楼-- · 2019-01-02 19:32

None of these worked for me. What I found was, in the editor, search the Keyboard Shortcuts file for editor.foldRecursively. That will give you the latest binding. In my case it was CMD + K, CMD + [.

查看更多
临风纵饮
6楼-- · 2019-01-02 19:33

Press

CTL + A

Then

CTL + M + M

To compress all, including child nodes, in XML-files.

查看更多
余欢
7楼-- · 2019-01-02 19:34

if you want to collapse and expand particular loop, if else then install following plugins for visual studio.

enter image description here

查看更多
登录 后发表回答