gregsexton / gitv

gitk for Vim.
938 stars 59 forks source link

Make foldmethod configurable or do not override it #44

Open blueyed opened 11 years ago

blueyed commented 11 years ago

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 commented 11 years ago

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 commented 6 years ago

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: