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

Feature request: Collapse/uncollapse directories #54

Closed
dgrisham opened this issue Apr 28, 2019 · 4 comments
Closed

Feature request: Collapse/uncollapse directories #54

dgrisham opened this issue Apr 28, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@dgrisham
Copy link

Curious whether there's interest in a feature to toggle whether directories are collapsed or not. For example, it'd be nice to be able to collapse all directories in the current root -- so you'd only see files and directories directly in the current root. It would also be nice to be able to toggle whether a directory is collapsed so you could quickly check the first few files in a directory.

My use case for this would be general navigation of code projects, especially in the context of introducing a new codebase to someone. It's really nice to be able to see a project's structure and focus on specific directories in these cases, and this ability to control collapsing of directories would help that a lot.

@Canop
Copy link
Owner

Canop commented May 1, 2019

@dgrisham I'll think about it. Right now I'll be more focused in windows compatibility but I'll experiment in that direction afterwards.

FYI the main motivation of broot was also navigation into code projects.

@Canop Canop added the enhancement New feature or request label May 1, 2019
@Canop Canop self-assigned this May 1, 2019
@Canop
Copy link
Owner

Canop commented Sep 18, 2019

This isn't the right approach. It's more efficient to go (with the enter key) into the directory, then to go back (with the esc key).
If necessary you can toggle root trimming (with :t).

@Canop Canop closed this as completed Sep 18, 2019
@Abdillah
Copy link

Abdillah commented Jul 3, 2023

I would say in term of navigation and jump, current broot is superior. But I hope, broot somehow support collapsible directory navigation.

The reason is somehow close to the main goal described above.

the main motivation of broot was also navigation into code projects.

When working on large or highly structured code project, directory structure is helpful to recall the structure of codes. For example when doing code refactoring or simply analyzing the current structure (learning code). File structure is what connect one code from another, if displayed in structured view lift the burden of the brain in remembering "where's the code in which file in which folder".

Additionally, it also looks cleaner.

@ww7
Copy link

ww7 commented Aug 11, 2023

I'm also wondering about collapse/uncollapse directories
For now my workaround is invocation of nnn/ranger by key

    {
        invocation: nnn
        key: ctrl-n
        leave_broot: false
        execution: "nnn {file}"
    }
    {
        invocation: xplr
        key: ctrl-x
        leave_broot: false
        execution: "xplr {file}"
    }
    {
        invocation: ranger
        key: ctrl-r
        leave_broot: false
        execution: "ranger --selectfile={file}"
    }

Only thing, I don't know if possible to return new path to Broot, can we? @Canop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants