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

Ivan picture Ivan · Jun 10, 2011 · Viewed 14.3k times · Source

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.

Answer

agent-j picture agent-j · Jun 10, 2011

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.