Loading ...
Sorry, an error occurred while loading the content.

Re: Python code folding...

Expand Messages
  • Paul Moore
    ... [...] 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.
    Message 1 of 9 , Oct 1, 2001
    • 0 Attachment
      On Sun, 30 Sep 2001 16:28:46 -0400, Benji Fisher <benji@...> wrote:

      > 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
      >this:
      [...]

      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
      starting point.

      This has now got off-topic, so I'll stop. I hope I'll get a Python folding
      script done soon...

      Paul.
    Your message has been successfully submitted and would be delivered to recipients shortly.