[SVN] Re: Whitespace sensitive code folding

Allan Odgaard mailinglist at textmate.org
Wed Aug 19 13:45:52 UTC 2009


On 17 Aug 2009, at 17:01, Tim Caswell wrote:

> I'm writing a language that is whitespace sensitive like python or
> haml and I'm having trouble getting code folding right.
>
> [...]
> I want every constructor (Line starting with capital) to open a block,
> and the last line with content before the first line that's indented
> same or less is the end.
>
> I looked at the python bundle, and It doesn't seem to be doing
> anything special, so I'm not sure what to do.

Unfortuantely this is outside what TM is capable of as it needs clear  
fold start and end line markers (and the matches are looking only at  
one line).

What Python does is treat the first line without (trailing) whitespace  
as the fold stop marker as a workaround.




More information about the textmate-dev mailing list