7

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.

Community
  • 1
  • 1
ndd
  • 3,051
  • 4
  • 25
  • 40

1 Answers1

6

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.

Steve Cadwallader
  • 2,656
  • 4
  • 28
  • 37
  • Thanks `SolutionExplorer.CollapseAll` did the trick (once the focus was set on SolutionExplorer) – ndd Feb 01 '16 at 14:15