On Sun, 30 Sep 2001 16:28:46 -0400, Benji Fisher <benji@...
> I think you are right: to get this behavior, you will need to use
>'foldexpr'. You have come pretty close to describing an algorithm for
>computing the indent; if you actually give such an algorithm, it cannot be
>hard to write a function to implement it. The algorithm is something like
That's about where I got to. Your description of the algorithm is clearer,
though. I did try to implement it, but didn't get it working properly. That's
probably because (a) I didn't spend long on it, and (b) I was struggling with a
dreadful cold at the time. I'll probably have a go at this again sometime soon.
If I get a working version, I should probably upload it somewhere. Is there a
"Folding scripts" section on vim.sf.net? I tried browsing vim.sf.net, but there
wasn't an obvious "folding scripts" category. Then again, the scripts aren't
really categorised at all. Would there be any point in doing so? I'd love to be
able to grab some examples of folding (indenting, whatever) scripts as a
This has now got off-topic, so I'll stop. I hope I'll get a Python folding
script done soon...