[TxMt] Collapsing based on indentation

Allan Odgaard throw-away-1 at macromates.com
Fri Nov 11 11:21:21 UTC 2005


On 10/11/2005, at 18.48, Colin D. Devroe wrote:

> Is there any chance of being able to set a preference where the  
> code collapsing is not based on indentation?

As mentioned in the past, more advanced folding is something I'll  
look into for 1.3.

> To be honest I'm not sure how other applications have handled  
> collapsing programmatically, but basing it on indentation seems to  
> be a bit buggy and doesn't work for every situation.

Very few editors implement foldings, and of those who do, many  
require some special marks in the code, like: /* {{{ */ to indicate a  
fold start marker.

Indent-based foldings is required for languages that re-use an 'end'  
keyword to end various types of blocks, where not all are foldable.  
I'm fully aware that this is not always optimal, but it works pretty  
well for 95% of the stuff out there…




More information about the textmate mailing list