Closed sunaku closed 7 years ago
Hi,
I mostly agree. I initially planned a more sophisticated method for one-key-toggling of folds, but this should be a separate plugin and not part of AnyFold.
So yes, anyfold_toggle_key
will go away and AnyFold should work with Vim's default folding commands. Exposing ReloadFolds()
is unfortunately still a hack... Optimally, the foldexpr
used should take care of keeping folds updated, but performance greatly suffers if this is done since reloading folds is really slow :zzz:.
So for the future, I'll consider implementing a faster fold updating, then there is no need to expose ReloadFolds()
. This will take some time, so as an immediate solution I'll implement your suggestion.
Thanks for the suggestion.
Hi again,
I went for the full solution that removes the need to expose ReloadFolds()
. So the good news is, anyfold_toggle_key
and anyfold_auto_reload
are both gone. Folds are always updated when text changes, so everything works out of the box with Vim's built-in folding commands.
Hello,
I find the mandatory mapping of
anyfold_toggle_key
to be unnecessary and imposing because Vim already has aza
shortcut that essentially does the same thing: the only difference between them is thatanyfold_toggle_key
honors theg:anyfold_auto_reload
setting whereas Vim'sza
does not. :disappointed:If you could expose the
ReloadFolds()
function as a<Plug>(AnyFold-Reload-Folds)
shortcut, then we could do away with the :scream_cat: mandatoryanyfold_toggle_key
and instead allow the user to decide :raised_hand_with_fingers_splayed: if they really want to triggerReloadFolds()
through a mapping (which is also of their choice):Thanks for your consideration.