Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure Visual Studio to collapse all regions by default?

When I open a code file in a new code window, I press Ctrl+M,O to collapse everything there. As far as I know this can be done by default, without need to press anything every time. I think I did it once, but can't remember where was this option located.

like image 725
Ivan Avatar asked Jun 10 '11 21:06

Ivan


People also ask

How do I Collapse all regions in Visual Studio?

(Ctrl+M, Ctrl+P) - Removes all outlining information for the entire document. (Ctrl+M, Ctrl+U) - Removes the outlining information for the currently selected user-defined region. Not available in Visual Basic. (Ctrl+M, Ctrl+O) - Collapses the members of all types.

How do I collapse all files in Visual Studio?

Expand / Close All Where you see braces or regions in code, you can collapse or expand them with the keyboard shortcut Ctrl + M, P to expand or Ctrl + M, O to collapse.

How do I collapse all functions in Visual Studio code?

How to Collapse All Source Code in VS Code? To fold all top-level and child elements of your code: Enter command >fold and hit enter.


1 Answers

This is possible. Go to the Tools menu, then select options.

Text Editor  \ C#    \ Advanced 

The option is called "Enter outlining mode when files open." When outlining mode is enabled, your regions are collapsed by default.

like image 190
agent-j Avatar answered Oct 12 '22 23:10

agent-j