I really like the default vim's zr and zm mappings, that have the semantic of "fold less" and "fold more".
This is useful if say, I have foldlevel set to 2, and then want to expand a bunch of the folds, instead of doing :se foldlevel=3 (which makes me have to remember the foldlevel that I have set currently), I can just do zr and express my intent more directly.
As far as I know, ufo doesn't have this kind of functionality. And because it's advised to keep foldlevel at a high value, I can't use the default zr & zm mappings.
It would be convenient to keep track of ufo's "foldlevel", whenever functions like closeFoldsWith() / openFoldsExceptKinds() are used, so that ufo's own zr & zm-like functionality can be implemented.
The idea for the implementation of that that I have, is to just have a map-like table that stores the buffer numbers as keys, and the current "foldlevel" as values. Then, when the closeFoldsWith() / openFoldsExceptKinds() functions are used, they would update that foldlevel value in the buffer.
Is this kind of functionality in-scope for the project? I would love to have it :)
I really like the default vim's
zr
andzm
mappings, that have the semantic of "fold less" and "fold more".This is useful if say, I have foldlevel set to 2, and then want to expand a bunch of the folds, instead of doing
:se foldlevel=3
(which makes me have to remember the foldlevel that I have set currently), I can just dozr
and express my intent more directly.As far as I know, ufo doesn't have this kind of functionality. And because it's advised to keep foldlevel at a high value, I can't use the default
zr
&zm
mappings.It would be convenient to keep track of ufo's "foldlevel", whenever functions like
closeFoldsWith()
/openFoldsExceptKinds()
are used, so that ufo's ownzr
&zm
-like functionality can be implemented.The idea for the implementation of that that I have, is to just have a map-like table that stores the buffer numbers as keys, and the current "foldlevel" as values. Then, when the
closeFoldsWith()
/openFoldsExceptKinds()
functions are used, they would update that foldlevel value in the buffer.Is this kind of functionality in-scope for the project? I would love to have it :)