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.
(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.
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 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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With