Turning off automatic outlining in Visual Studio

2020-05-29 12:44发布

问题:

Can any one tell me how to turn off automatic outlining in Visual Studio? Outlining is the feature that collapses code into programmer defined regions.

In my opinion, there are precious few circumstances where outlining is useful. Yes, it makes large files easier to navigate, but mostly it obscures complexity. My preference would be to have this feature turned off by default when opening a source file.

回答1:

In Visual Studio, go to Tools > Options > Text Editor > C# > Advanced

Clear the checkbox Enter outlining mode when files open



回答2:

Tools -> Options -> Text Editor -> C# -> Advanced -> Outlining.



回答3:

For VB it's Tools - Options - Text Editor - Basic - VB Specific - Enable outlining mode



回答4:

For VS2008, it's under Tools – Options – Text Editor – C/C++ - Formatting - Enter outlining mode when files open.