[TxMt] folding comment blocks

Caio Chassot k at v2studio.com
Wed Oct 5 01:09:25 UTC 2005


On Oct 04, 2005, at 18:26, Allan Odgaard wrote:
> So for Ruby comments you'd have to make up some convention, like using 
> + on first comment line and - on last, e.g.:
>
>     #+
>     #  This is a comment block
>     #  which automatically folds
>     #-
>

That's ok for code that I write, but I need it most when reading 
heavily documented code like, say, active_record. Can anything be done 
to fold standard ruby comments automatically?

If not, given that this comment style is common to so many languages, 
would you consider implementing a solution that makes it possible?

One idea: you could implement an alternative way of specifying foldings 
that would address this and hopefully other situations (eg. paragraphs, 
lists and blockquotes in markdown). Basically what we need is a way to 
fold a group of consecutive lines that match a pattern, so:

foldingGroupMarker = "#"




More information about the textmate mailing list