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

How to fold a directory #2743

Closed
jiangyinzuo opened this issue Jun 23, 2023 · 7 comments
Closed

How to fold a directory #2743

jiangyinzuo opened this issue Jun 23, 2023 · 7 comments

Comments

@jiangyinzuo
Copy link

Topic
I have a large untracked directory and I want to fold it. What should I do? Is this feature already supported?

My lazygit version is commit=d1a8b05401ccda1e52215203139a252eb3be3b79, build date=2022-11-14T09:22:31Z, build source=binaryRelease, version=0.36.0, os=linux, arch=amd64, git version=2.39.2

My thoughts
If this feature is already supported, then it's better to add an item after toggle file tree view to the menu

image
@mark2185
Copy link
Collaborator

Just press Enter when the directory is highlighted.

Also I'd suggest adding .cache to the ignorefile by pressing i on it, a menu will pop up.

@jiangyinzuo
Copy link
Author

It works. Thanks for your help!

@mark2185
Copy link
Collaborator

Be sure to watch the introductory video to lazygit - 15 lazygit features in under 15 minutes :)

@crhf
Copy link

crhf commented Sep 18, 2023

Can I collapse a folder when I'm inside it? just like backspace in nvim-tree.

@mark2185
Copy link
Collaborator

@crhf unfortunately that's not currently possible, but it might be a worthy addition.

Although, I don't see any information about a parent for the currently selected Node which would come in handy to know which folder to fold.

@jesseduffield thoughts? Aside from adding a Parent member, I don't have any other ideas. Searching upwards for the first Directory is undesirable IMO.

@jesseduffield jesseduffield changed the title How to fold a directory in Files panel? How to fold a directory from within Sep 25, 2023
@jesseduffield jesseduffield changed the title How to fold a directory from within Support folding a directory from within Sep 25, 2023
@jesseduffield jesseduffield changed the title Support folding a directory from within How to fold a directory Sep 25, 2023
@jesseduffield
Copy link
Owner

We should allow folding a directory from within. I'm happy for the code to just search for the directory from the top level, it wouldn't be expensive to do.

@diego898
Copy link

Did this ever get added or is there a feature request tracking it? Thanks!

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

5 participants