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] Fold the sections #2111

Closed
ray-x opened this issue Feb 5, 2023 · 4 comments
Closed

[Feature Request] Fold the sections #2111

ray-x opened this issue Feb 5, 2023 · 4 comments

Comments

@ray-x
Copy link

ray-x commented Feb 5, 2023

I am wondering if the sections in G can be folded:
image

One workaround would be add <Tab> before each items in the list, so I can use za to toggle the folding.

Thanks!

Similar feature in other projects:
Folded
image
Unfolded
image

@tpope
Copy link
Owner

tpope commented Feb 5, 2023

I would like it on the record that this issue is essentially "I've made a mess of my my untracked files, please add a feature where I can avoid having to look at the mess I made." There are multiple options at your disposal to deal with untracked files that do not involve changing Fugitive:

  • Add them to .git/info/exclude (perhaps using gI).
  • Add them to .gitignore (perhaps using 1gI).
  • Turn off status.showUntrackedFiles.
  • Delete them.
  • Move them to a location outside the repository.

That said, this is #1317 again, and I will be following up on my proposal there to mark the relevant syntax groups as foldable.

@tpope tpope closed this as completed in 2019e0e Feb 5, 2023
@kevinhwang91
Copy link

kevinhwang91 commented Feb 6, 2023

Feel confused about fugitive doesn't setl foldmethod=syntax and I don't think there is a perf issue for that.

@tpope
Copy link
Owner

tpope commented Feb 6, 2023

From #1317:

I just removed automatically enabled folding in the status window.

This is when Fugitive stopped doing setl foldmethod=syntax.

Assuming that doesn't ruffle too many feathers then I am fine to add the extra level section of folding since it will only affect those who opt in.

Phrased another way: I think folding sections makes Fugitive worse, so I'm only willing to make it possible if it's off by default.

@kevinhwang91
Copy link

Got it, thanks for your explanation.

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

No branches or pull requests

3 participants