Collapse all expanded sidebar folders in Sublime Text 2

Sublimetext2Sublimetext

Sublimetext2 Problem Overview


Is there a menu option or keyboard shortcut to collapse all expanded folders in the sidebar? It gets messy over there and seems like there should be a better way than closing them one by one.

Sublimetext2 Solutions


Solution 1 - Sublimetext2

On OSX: option + left click at the root node.

On windows/linux: control + alt + left click

Solution 2 - Sublimetext2

For Sublime Text 3 on Linux Mint 17.2 w/ Cinnamon I had to disable the following setting:

System Settings->Windows->Behavior->Moving and Resizing Windows->Special key to move and resize windows

After that Alt+left click worked!

Solution 3 - Sublimetext2

using purely keyboard, on a mac, to unfold

CMD + K + 0

to fold, depending on the level of indentation

CMD + K + {level of indentation number} (eg. CMD + K + 2)

Refer here for more details functions of sublime text. Found this really helpful

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionneurodynamicView Question on Stackoverflow
Solution 1 - Sublimetext2AGSView Answer on Stackoverflow
Solution 2 - Sublimetext2BillyView Answer on Stackoverflow
Solution 3 - Sublimetext2VicView Answer on Stackoverflow