On 10/18/05, Jeroen van der Ham jeroen@je-ju.net wrote:
Allan Odgaard wrote:
On 18/10/2005, at 3.37, Chris Fonnesbeck wrote:
After loading a python file into textmate, I noticed that the folding is very inconsistent [...] has this problem not been fixed in the past year?
It hasn't been fixed, and it's unlikely to be until 1.3.
Bit of context: creating foldings for python programs is hideously difficult if you don't include extra whitespace to aid the parser.
For example:
class someClass: def someMethod(self, foo, bar): foo = bar + 1
return foo
The function folding close marker should come after return foo, but there's no way to know that it should be there if you don't include 4 spaces on that line.
So the workaround for this is to include whitespace in your code. It's not ideal, but doing it any other way is far from trivial.
Jeroen.
Is there any way to turn off folding until this is fixed? Right now my code looks like a dog's breakfast, with folding in arbitrary places.
C.