Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 Collapse all shortcut

Solution explorer

I have gone thru http://visualstudioshortcuts.com/2015/ this link and Keyboard shortcuts inside Visual Studio to see if I can set up keyboard shortcut for "Collapse All" inside solution explorer so far no luck. Keyboard shortcuts

FWIW I don't have access to Resharper and I did use CodeMaid for "Collapse all"

Collapse all

but after installing it every time I try to close my Visual Studio I ended with error (tried suggestions from the Github issue page but didn't work) so had to finally uninstall it

I have also referred many links like below ones but none of them helped.

  • Attach a keyboard shortcut to 'Collapse All' items in solution explorer with Visual Studio 2012
  • Visual Studio: Is there a way to collapse all items of Solution Explorer?
like image 389
ndd Avatar asked Oct 30 '15 16:10

ndd


People also ask

How do I collapse all in Visual Studio?

(Ctrl+M, Ctrl+U) - Removes the outlining information for the currently selected user-defined region. Not available in Visual Basic. (Ctrl+M, Ctrl+O) - Collapses the members of all types.

What is the shortcut to collapse all functions in Visual Studio?

Ctrl+K Ctrl+[ Fold (collapse) all subregions editor. Ctrl+K Ctrl+] Unfold (uncollapse) all subregions editor. Ctrl+K Ctrl+0 Fold (collapse) all regions editor.

How do you collapse all visual codes?

How to Collapse All Source Code in VS Code? To fold all top-level and child elements of your code: Enter the command >fold and hit Enter.


1 Answers

The command you want to map is SolutionExplorer.CollapseAll. The trick is that it won't work unless the Solution Explorer has focus, so you'll have to first use a keystroke to set focus (e.g. Ctrl+Alt+L) then your secondary keystroke you define. The escape key afterwards will return focus to your previous window (e.g. code editor).

If you're still having any issues with CodeMaid, I would love to work them out with you. The issues previously listed were for VS2013 and were difficult to consistently reproduce.

like image 122
Steve Cadwallader Avatar answered Oct 21 '22 02:10

Steve Cadwallader