Sublime Forum

Is there any way to collapse all subfolders in the sidebar?

#1

Currently there seems to be no way to do this.

Example:

  1. A folder with structure:

Some_Folder_I_Want_To_Visit
–Folder1
----Stuff1
----Stuff2
----A_lot_of_stuff
----StuffN
–Folder2
----Stuff1
----Stuff2
----A_lot_of_stuff
----StuffN
–FolderN_with_same_struct

  1. When all the subfolders are opened/expanded, and I want to get Folder4/Stuff5

  2. I found it’s hard for me to locate it (I know there is Ctrl+P, but just forget it)

Solution:

Provide a button/command, when triggered, collapse all subfolders recursively, so I can simply open/extend/locate

0 Likes

#2

I’m not sure what OS you are on, but on macOs I can hold down alt and click on a directory. This will either close every subfolder in that directory or open them all depending on if it is already open or not. I’m not sure this is what you are looking for? Might be a different key depending on your OS.

1 Like

#3

Thanks, it’s what I want.

I wonder where you see this tip, because I cannot get related article, nor by “sublime.log_commands(True)”

0 Likes

#4

It’s not a command that’s bound to any particular key; it’s just something inherently hard coded into the UI.

1 Like

#5

To be honest I can’t remember how I found this out. I am on the Sublime Text Discord server which you can join at https://discord.sublimetext.io. There is a lot of helpful conversations that happen there.

1 Like