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

Make foldmethod configurable or do not override it #44

Open
blueyed opened this issue Oct 16, 2012 · 2 comments
Open

Make foldmethod configurable or do not override it #44

blueyed opened this issue Oct 16, 2012 · 2 comments
Labels
feature request Functionality that is not yet possible
Milestone

Comments

@blueyed
Copy link
Contributor

blueyed commented Oct 16, 2012

Similar to commit 64619e4 ("Respect the user's foldlevelstart settings"), the user's foldmethod should not get overwritten to "syntax" probably.

It looks like there are two places where this gets done:

./plugin/gitv.vim:        silent setlocal fdm=syntax
./plugin/gitv.vim:        call s:MoveIntoPreviewAndExecute('setlocal fdm=syntax', 0)

This should be made either configurable, or documented how to accomplish this using autocommands (e.g. by matching for "fugitive://" buffers).

"foldmethod=syntax" causes the diff hunks to be closed, while I would like to have them open by default instead.

@gregsexton
Copy link
Owner

Hi, I'm not actively making changes to gitv at the moment. If this is annoying enough that you don't mind changing it, I'll happily merge in pull requests.

@rbong rbong added this to the 1.4 milestone Apr 14, 2017
@rbong rbong added the feature request Functionality that is not yet possible label Jun 9, 2018
@rbong
Copy link
Collaborator

rbong commented Jun 9, 2018

I was hoping to fix this in 1.4, but it raises questions that are a bit more involved than I'd like to answer for a simple stability and bugfix release. I'm pushing this out.

Turns out we rely on the foldmethod being syntax in order to hide unrelated diffs when viewing a range of lines in file browser mode.

I have to answer the following questions:

  • When does gitv reserve the right to command the fold method of the window? In file browser mode? In ranged file browser mode? All the time? What about in ranged file browser mode with diffs that ONLY apply to the range, so nothing needs to be hidden?
  • What methods can be provided to users looking for a way to handle the inconsistency, if any, of only sometimes having control of their folds?
  • If folds are not used to display which diffs are part of the current range, what method can be used?

@rbong rbong modified the milestones: 1.4, 1.4.1 Jun 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Functionality that is not yet possible
Projects
None yet
Development

No branches or pull requests

3 participants