Collapse All shortcut

Hi,

Is there a shortcut for Collapse All in the Solution Explorer? If not, is it possible to assign one?

Cheers,
Jose

6 comments
Comment actions Permalink

Hello,

Is there a shortcut for Collapse All in the Solution Explorer?


No.

If not, is it possible to assign one?


Yes.

The command name contains "CollapseInSolutionExplorerAction".


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0
Comment actions Permalink

That is very cool... I notice it only works as I expect if you select the
root solution node (collapses all projects in the solution).

It'd sure be nice if I could hit the key even while focus is in the editor
and have it collapse everything in the solution explorer.

We have one solution that has almost a hundred projects in it, and it's
really irritating that VS2008 insists on expanding them all every time it
loads.  Until I saw this post, I had no idea there was any other option than
laboriously clicking the minus sign next to each project, so I could
concentrate on just the one project I cared about.

Anyway, thanks for making this available, but why hide it?!? :)


"Serge Baltic" <baltic@intellij.net> wrote in message
news:dc0986bf14f3938cc7ecabec5ddcc@news.intellij.net...

Hello,

>
>> Is there a shortcut for Collapse All in the Solution Explorer?
>

No.

>
>> If not, is it possible to assign one?
>

Yes.

>

The command name contains "CollapseInSolutionExplorerAction".

>


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”

>

0
Comment actions Permalink

Hello Paul,

You can help yourself with some magic :) First, disable "Track Active item
in Solution Explorer". Use ReSharper's Alt-Shift-L to locate current file
in Solution Explorer when needed. Second, open solution and collapse it,
then close solution. Reopen solution, and if it didn't persist expand/collapse
state then you post likely have corrupted .suo file. Erase it and start over
(you will loose some per user per solution settings though, like current
startup project; consider backup).

Sincerely,
Ilya Ryzhenkov

JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


PB> That is very cool... I notice it only works as I expect if you
PB> select the root solution node (collapses all projects in the
PB> solution).
PB>
PB> It'd sure be nice if I could hit the key even while focus is in the
PB> editor and have it collapse everything in the solution explorer.
PB>
PB> We have one solution that has almost a hundred projects in it, and
PB> it's really irritating that VS2008 insists on expanding them all
PB> every time it loads.  Until I saw this post, I had no idea there was
PB> any other option than laboriously clicking the minus sign next to
PB> each project, so I could concentrate on just the one project I cared
PB> about.
PB>
PB> Anyway, thanks for making this available, but why hide it?!? :)
PB>
PB> "Serge Baltic" <baltic@intellij.net> wrote in message
PB> news:dc0986bf14f3938cc7ecabec5ddcc@news.intellij.net...
PB>
>> Hello,
>>
>>> Is there a shortcut for Collapse All in the Solution Explorer?
>>>
>> No.
>>
>>> If not, is it possible to assign one?
>>>
>> Yes.
>>
>> The command name contains "CollapseInSolutionExplorerAction".
>>
>> —
>> Serge Baltic
>> JetBrains, Inc — http://www.jetbrains.com
>> “Develop with pleasure!”


0
Comment actions Permalink

Hello,

On our solution which is also quite large (not surprisingly:) I'd mostly
rely on Goto Type, Goto Symbol and Goto Recent File/Edit for navigating for
"large distances". As for the small distances (within a folder in Solution
Explorer), it does not quite matter if the others are expanded or not.


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0
Comment actions Permalink

Hey thanks! this a much better solution than a shortcut to Collapse All!

0
Comment actions Permalink


PaulB wrote:

That is very cool... I notice it only works as I expect if you select the
root solution node (collapses all projects in the solution).



It'd sure be nice if I could hit the key even while focus is in the editor
and have it collapse everything in the solution explorer.

We have one solution that has almost a hundred projects in it, and it's
really irritating that VS2008 insists on expanding them all every time it
loads.  Until I saw this post, I had no idea there was any other option than
laboriously clicking the minus sign next to each project, so I could
concentrate on just the one project I cared about.



I had the same question, and this is what I ended up doing.

This works under Visual Studio 2012, not sure about other versions.

If the solution explorer has the focus, then you can press 'Home' which will take you to the root solution node.
Then use the keyboard shortcut for collapse all.

If the editor has the focus, then you can press 'Ctrl+W, S' to focus on the solution explorer, then the 'Home', then the keyboard shortcut for collapse all.

Okay that sounds like a lot of stuff just to collapse the projects in the solution explorer.

If you have a programmable keyboard, you can make a macro, which is what I ended up doing.
0

Please sign in to leave a comment.