如何在VS2017中恢复Ctrl+M,O行为

时间:2023-01-01 03:33:26

In VS2015 and before, Ctrl+M,O would collapse all constructors, methods, properties in a file. It would also collapse all regions.

在VS2015和之前,Ctrl+M、O将在文件中折叠所有构造函数、方法和属性。它也会使所有地区崩溃。

In VS2017 it no longer collapses the regions.

在2017年的VS2017年,它将不再崩溃这些地区。

I really liked the high level view that this keyboard chord produced, with collapsed regions. In VS2017 that chord will actually expand all regions too.

我真的很喜欢这个键盘和弦产生的高级视图,有折叠的区域。在2017年VS2017年,chord也将扩展所有地区。

You can invoke Ctrl+M,L twice, but this collapses everything which makes it impossible to see anything.

你可以调用Ctrl+M,L两次,但是这会使所有的东西都折叠起来,这样就不可能看到任何东西。

Is there a way of getting the old behaviour back?

是否有办法让旧的行为回归?

1 个解决方案

#1


13  

Seems like there's a solution for it here If I understood you right

如果我理解对了,这里似乎有解决的办法

It seems that this behavior still exists within visual studio 2017 except it is turned off by default. It can be enabled under Tools -> Options -> Text Editor -> C# -> Advanced -> Outlining -> "Collapse #regions when collapsing to definitions"

这种行为似乎仍然存在于visual studio 2017中,除非它是默认关闭的。它可以在工具->选项->文本编辑器-> c# ->高级->大纲->“折叠到定义时的折叠#区域”下启用

如何在VS2017中恢复Ctrl+M,O行为

#1


13  

Seems like there's a solution for it here If I understood you right

如果我理解对了,这里似乎有解决的办法

It seems that this behavior still exists within visual studio 2017 except it is turned off by default. It can be enabled under Tools -> Options -> Text Editor -> C# -> Advanced -> Outlining -> "Collapse #regions when collapsing to definitions"

这种行为似乎仍然存在于visual studio 2017中,除非它是默认关闭的。它可以在工具->选项->文本编辑器-> c# ->高级->大纲->“折叠到定义时的折叠#区域”下启用

如何在VS2017中恢复Ctrl+M,O行为