zed icon indicating copy to clipboard operation
zed copied to clipboard

Collapse folder in file explorer

Open balaji-sivasakthi opened this issue 5 months ago • 11 comments

Check for existing issues

  • [X] Completed

Describe the feature

When I've big file tree, I need to close the all the opened child directories, this feature really helps when it comes to handy.

If applicable, add mockups / screenshots to help present your vision of the feature

Screenshot 2024-01-27 at 9 51 02 PM

balaji-sivasakthi avatar Jan 27 '24 16:01 balaji-sivasakthi

Is this what you're talking about?

{
  "context": "ProjectPanel && not_editing",
  "bindings": {
    "m": "project_panel::CollapseAllEntries"
  }
}

hhh

d1y avatar Jan 29 '24 07:01 d1y

Yes, @d1y

balaji-sivasakthi avatar Jan 29 '24 12:01 balaji-sivasakthi

This is great, would be nice to have an option to only close the children of the folder that is currently active. So if we have the below file structure where all folders are open and Folder 1 is selected in the side panel, running a collapse command on it would only collapse Folder 1 and Folder 1.2 but would leave Folder 2 and it's children open.

Project

  • Folder 1
    • Folder 1.1
      • file1.txt
  • Folder 2
    • Folder 2.1
      • file2.txt

project_panel::CollapseAllEntries fixes 99% of my use cases but it is nice to have the above functionality as well if possible one day 😊

itsmewes avatar Jan 30 '24 07:01 itsmewes

I'd love to see not only having a Key bind to close the Folders, but also to have a Icon to do it.

TheGlorySaint avatar Jan 30 '24 08:01 TheGlorySaint

Yeah, it's like there needs to be an option like project_panel::CollapseAllEntries but only for the selected folder and down, so like project_panel::CollapseAllEntriesBelowSelection or something.

orbiteleven avatar Jan 30 '24 13:01 orbiteleven

Yeah, it's like there needs to be an option like project_panel::CollapseAllEntries but only for the selected folder and down, so like project_panel::CollapseAllEntriesBelowSelection or something.

Agree with this. Having an option to be able to collapse a section using a Cmd+click like on VsCode could be really useful.

gh0stonio avatar Feb 14 '24 17:02 gh0stonio

I'd love to see not only having a Key bind to close the Folders, but also to have a Icon to do it.

+1

edtorba avatar Feb 16 '24 09:02 edtorba

Yeah definitely would love to have a button to collapse my entire directory tree. Especially helpful in big monorepos where you need to navigate between workspaces frequently.

segersniels avatar Mar 06 '24 23:03 segersniels

Is it possible to trigger this action from inside the editor pane? Right now I need to be focused in the LeftDock for this command to work

tomatau avatar Mar 12 '24 14:03 tomatau

That would be very nice, I use it every day.

AdamSchinzel avatar Mar 28 '24 08:03 AdamSchinzel

Im not sure if there's a better issue to comment on, but support for option + clicking folders in the explorer to toggle nested folders expansion state would be an amazing quality of life improvement.

https://github.com/zed-industries/zed/assets/104145051/936d0a2b-e1fc-4687-b56d-4389ce4e9400

cabaucom376 avatar Apr 16 '24 03:04 cabaucom376