visual-studio Visual Studio 最小化区域快捷方式?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4165203/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Visual Studio Minimize regions shortcut?
提问by PICyourBrain
Is there a shortcut key in Visual Studio that will minimize all of the regions or + signs so that I don't have to go through and click each one individually?
Visual Studio 中是否有快捷键可以最小化所有区域或 + 号,这样我就不必逐一逐一单击?
回答by Patrick
C-m, C-o // collapse all
C-m, C-l // expand all
C-m, C-m // collapse, expand one
Where C is short for Ctrl. You can find more shortcuts at the msdn site
其中 C 是 的缩写Ctrl。您可以在msdn 站点上找到更多快捷方式
You can find the commands by going to Keyboard Options under the Tools menu, they are mapped to these commands
您可以通过转到“工具”菜单下的“键盘选项”来找到这些命令,它们被映射到这些命令
- Edit.CollapseToDefinitions (
C-m, C-o), - Edit.ToggleOutliningExpansion (
C-m, C-m) and - Edit.ToggleAllOutlining (
C-m, C-l)
- Edit.CollapseToDefinitions (
C-m, C-o), - Edit.ToggleOutliningExpansion (
C-m, C-m) 和 - Edit.ToggleAllOutlining (
C-m, C-l)
If you are using Visual Studio Code the commands are similar but work differently. The commands are roughly these
如果您使用的是 Visual Studio Code,则命令类似但工作方式不同。命令大致是这些
C-k 2- Fold Level 2C-k C-j- Unfold allC-k [- Unfold recursively (unfold where the caret is)
C-k 2- 折叠 2 级C-k C-j- 展开所有C-k [- 递归展开(展开插入符号所在的位置)
You can search for Fold or Unfold commands (using C-S-p) to find all of them.
您可以搜索折叠或展开命令(使用C-S-p)来查找所有这些命令。
回答by Drew Noakes
- Ctrl+ M,M- expand/collapse at caret
- Ctrl+ M,O- collapse all in document
- Ctrl+ M,L- expand all in document
- Ctrl+ M, M- 在插入符号处展开/折叠
- Ctrl+ M, O- 折叠文档中的所有内容
- Ctrl+ M, L- 在文档中展开全部
回答by Gerrie Schenck
Ctrl+ M, Ctrl+ M
Ctrl+ M, Ctrl+M
You can perform this on a selection too.
您也可以对选择执行此操作。


