You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find the mandatory mapping of anyfold_toggle_key to be unnecessary and imposing because Vim already has a za shortcut that essentially does the same thing: the only difference between them is that anyfold_toggle_key honors the g:anyfold_auto_reload setting whereas Vim's za does not. 😞
If you could expose the ReloadFolds() function as a <Plug>(AnyFold-Reload-Folds) shortcut, then we could do away with the 🙀 mandatory anyfold_toggle_key and instead allow the user to decide 🖐️ if they really want to trigger ReloadFolds() through a mapping (which is also of their choice):
nmapza<Plug>(AnyFold-Reload-Folds):normal! za<CR>
Thanks for your consideration.
The text was updated successfully, but these errors were encountered:
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 💤.
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.
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. 😞If you could expose the
ReloadFolds()
function as a<Plug>(AnyFold-Reload-Folds)
shortcut, then we could do away with the 🙀 mandatoryanyfold_toggle_key
and instead allow the user to decide 🖐️ if they really want to triggerReloadFolds()
through a mapping (which is also of their choice):Thanks for your consideration.
The text was updated successfully, but these errors were encountered: