visual-studio 在解决方案资源管理器中折叠项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/798039/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 10:25:04  来源:igfitidea点击:

Collapse projects in Solution Explorer

visual-studio

提问by Vadim

How can I collapse / expand all projects in Solution Explore using keyboard?

如何使用键盘折叠/展开解决方案探索中的所有项目?

采纳答案by Jason

Power Commands for VS2008 has a command to do this, plus lots of other neat tools

VS2008 的 Power Commands 有一个命令可以做到这一点,还有许多其他简洁的工具

http://code.msdn.microsoft.com/PowerCommands

http://code.msdn.microsoft.com/PowerCommands

You could also write a macro to do it, and assign it to a key combination

您也可以编写一个宏来执行此操作,并将其分配给一个组合键

http://weblogs.asp.net/israelio/archive/2007/09/06/visual-studio-collapse-selected-node.aspx

http://weblogs.asp.net/israelio/archive/2007/09/06/visual-studio-collapse-selected-node.aspx

回答by Chad Dienhart

In Visual Studio 2013it is finally just part of solution explorer... with a "Collapse All" icon. enter image description here

Visual Studio 2013 中,它最终只是解决方案资源管理器的一部分......带有“全部折叠”图标。 在此处输入图片说明

The right click option available with earlier versions of power tools in is not there but clicking the icon is easier anyway.

早期版本的电动工具中没有可用的右键单击选项,但无论如何单击图标更容易。

回答by EddyQ

The *, +and -on the numeric pad controls do this:

*+-数字键盘上的控制做到这一点:

  • Open the solution explorer, select the folder to expand and press *.

  • To collapse, press -.

  • Then if you have collapsed some sub-folders, press +to return to your partially collapsed version.

  • 打开解决方案资源管理器,选择要展开的文件夹并按*

  • 要折叠,请按-

  • 然后,如果您折叠了一些子文件夹,请按+返回到部分折叠的版本。

回答by ScottCate

Press CTRL+ALT+L to focus on Solution Explorer. If it's not on the screen, or it's collapsed, this will focus on it.

按 CTRL+ALT+L 专注于解决方案资源管理器。如果它不在屏幕上,或者它已折叠,则会聚焦于它。

Then press your left arrow key as many times as it takes to get to the solution, and with another left, it'll collapse the whole tree.

然后多次按左箭头键以找到解决方案,再按一次左箭头键,它将折叠整个树。

I jsut tested VS2008, and you can also press HOME, to get to the top of the tree.

我刚刚测试了 VS2008,你也可以按 HOME,到达树的顶部。

If what you want, is the solution open, and all the project files closed, then ....

如果您想要的是打开解决方案并关闭所有项目文件,那么....

once you're home in the tree view, press down,left for each open project and|or open solution folder (if you have those).

回到树状视图的主页后,按向下,向左按每个打开的项目和|或打开解决方案文件夹(如果有的话)。

The power tools that @Jason mentioned, might have a different solution, but this is how you can navigate the Solution Tree without any add-ins.

@Jason 提到的强大工具可能有不同的解决方案,但这是您无需任何加载项即可导航解决方案树的方法。