nvim-ufo icon indicating copy to clipboard operation
nvim-ufo copied to clipboard

implement zr and zm more like default behavior

Open fisher-j opened this issue 10 months ago • 8 comments

Feature description

Related to #62, I would like it if zr would decrease the amount of folding and zm would increase the amount of folding.

Describe the solution you'd like

Starting with no folds, zm would need to be aware of the maximum fold level currently used in a document and incrementally reduce this value. The foldlevel could possibly be tracked by a buffer local variable (vim.b.ufo_foldlevel?), similar to foldlevel.

zr would then increment vim.b.ufo_foldlevel up to the maximum currently used in the document.

Additional context

Thank you for your work on this plugin, it has made it possible for me to use folds on large markdown documents with many code chunks, where before it was impossibly slow!

fisher-j avatar Aug 24 '23 17:08 fisher-j