Skip to content

Allow dirvish-subtree skip collapse intermediate folders #328

@thanhvg

Description

@thanhvg

Is your feature request related to a problem? Please describe.
dirvish-collapse is very useful feature when exploring projects with nested single folders such as java. However when I dirvish-subtree-toggle on the collapsed folder, the tree expand one by one like a regular folder.

Describe the solution you'd like
I would like an option in dirvish-subtree that skips the intermediate folders of the collapsed one and expand the leaf folder of the collapsed.

Here is an example of github side bar file explorer https://github.com/apache/directory-scimple/tree/develop/scim-server/src/test/java/org/apache/directory/scim/server

On the side bar the collapse is java/org/apache/directory/scim/server and when expanding the intermediate org, apache, directory, scim are skipped (or hidden) and the leaf server is expanded revealing sub folders it and rest

Image

Describe alternatives you've considered
I played around and was able to make dirvish-subtree--insert expand a collapse tree recursively to the leaf folder. But I would like to have the intermediate folders not shown to save room and make it tidy.

Additional context
Many mainstream IDE side bar file trees support this feature, treemacs also does it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions