Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapse folders hotkey or option? #34

Open
jesseleite opened this issue Mar 7, 2015 · 9 comments
Open

Collapse folders hotkey or option? #34

jesseleite opened this issue Mar 7, 2015 · 9 comments

Comments

@jesseleite
Copy link

After a while using this plugin, all my folders are left open. It would be nice if there was an option and/or a hotkey to collapse all folders and subfolders?

@TheSpyder
Copy link
Owner

TheSpyder commented Mar 8, 2015

Sadly, no. As much as I want to, Sublime doesn't have any sidebar APIs. At all. The only thing this plugin does is automate right click -> reveal in side bar.

There is an open feature request with Sublime about this, but I don't hold much hope of it ever happening:
http://sublimetext.userecho.com/topic/19475-side-bar-api/
[edit November 2016: Looks like this request has been deleted. Sorry, I think we're out of luck.]

What I do to mitigate this is use a "focus side bar" keyboard shortcut, and then the arrow keys will collapse the tree (left navigates up to folders, then again to collapse it). To do this, add { "keys": ["super+1"], "command": "focus_side_bar" } in your user keybindings.

@TheSpyder
Copy link
Owner

since 4 of the last 5 issues logged are about this, I'm reopening it to leave as a marker for those coming to ask for it.

@Kristinita
Copy link

@TheSpyder , by my senses, the Sublime Text developers are not looking at UserEcho anymore. I think, it would be nice to create feature request in SublimeTextIssues/Core.

Thanks.

@TheSpyder
Copy link
Owner

Interesting. I know UserEcho has being ignored for years, I've seen github bug tracking projects like that in the past but they looked unofficial. That one is definitely seeing involvement from the developer. Thanks for the pointer!

@ctf0
Copy link

ctf0 commented Jun 24, 2017

i was going to ask for a solution for the same issue but from a different angle.

maybe the plugin can show the gotofile menu as usual and only expand the folder that has the selected file , as atm the plugin will expand any folder you hover over in the gotofile menu.

as a solution-ish for @jesseleite instead of scrolling all the way up in the sidebar, u can use Ctrl + 0 which activate the sidebar panel, then press Home/End which takes u to the top or bottom of the sidebar list

@AshHeskes
Copy link

Is there a cheat way to do: on file close > collapse all folders > cycle through tabs > reveal in sidebar. Assuming that could be done without causing the tabs to jump all over the place.

@andremacola
Copy link
Contributor

alt (option on mac) + mouseclick on folder does that.

@andremacola
Copy link
Contributor

To collapse all folders with children just do the command above, maybe we can add a hotkey simulating focus on sidebar and collapse but I don't known if this the focus of this package.

I think I can do something about it when the project has to many files/folders:

  • Close all folders/children than reveal the file on sidebar.

The problem is that maybe the sidebar will dance/jump a lot and it can be kind of weird

@jueti
Copy link

jueti commented Nov 17, 2021

focus to side bar: ctrl + 0
collapse one by one: left, down, left, down, left, down, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants