On 19 Oct 2004, at 21:39, Chris Brierley wrote:
It seems to me this would work perfectly for Python and the other cases that Andre mentioned. I also think it would work for most cases of "sanely" written code, without having to specify start and stop markers in the bundles.
Agree, but I think you need both...
Certainly, if TM is to support folding for Python, then a mode that works on purely on indentation is essential. (For those not familiar with it, indentation _is_ the block structure in Python code).
But for languages that do define block start and end 'markers', I'm sure people want the flexibility to be able to put those markers where they see fit - and not be restricted to a particular style of indentation. C is a good example of a language in which people become attached (sometimes to the point of terminal neurosis ;), to a particular block style - and not always one that strictly follows the rules of indentation.
I think my favourite solution would be to have 'indentation-based' folding as a default, which could then be overridden by the definition of start / stop markers. (Either or both).
I'll shut up now too ..
Cheers, -- Andre