Closed anntzer closed 6 years ago
Thanks, this looks great. Sorry for the very long delay here, trying to get some other things finished at the moment but will give it a try soon.
I agree that the has('python')
check probably needs to be incorporated. Linux distros almost always has some sort of python installed, but maybe some Windows does not?
Actually I'll look into rewriting this with vimscript.
Closing this; I think we're better off with the VimL version.
Add folding support, as proposed in #25. This was actually surprisingly easy. This is a Python implementation (so perhaps it should be protected by
if has('python')
, but in truth it "should be" easy to implement a vimscript version as well. (Perhaps you can consider this a proof of concept for now.) A cache is used and updated on-demand because vim callsfoldexpr
once per line, so it would be (quadratically) wasteful to rescan the buffer from the beginning to get the foldlevel for each line.