[TxMt] folding comment blocks
David Jack Olrik
david at olrik.dk
Wed Oct 5 13:19:30 UTC 2005
On 04/10/2005, at 23.26, Allan Odgaard wrote:
> Which would be foldable by using these patterns:
>
> foldingStartMarker = '#\+';
> foldingStopMarker = '#-';
What about a start marker that is all the lines to be folded, and an
endmarker that is the space just after the block but before the next
block.
So something like
foldingStartMarker = '(?: beginning of line, #, chars in line, end
of line )+'
foldingStopMarker = ''
...
If the marker is placed at the outer edge of the block, then prehaps
the same regex can be used for both start and stop marker, providing
the marker matches the whole block.
So the markers would match the whole block and be placed like this:
M # code
# code
# code
# code
# code
# code
# code
M # code
--
Best regards,
David Jack Olrik <david at olrik.dk> http://david.olrik.dk
GnuPG fingerprint C290 0A4A 0CCC CBA8 2B37 E18D 01D2 F6EF 2E61 9894
["The first rule of Perl club is You do not talk about Perl club"]
More information about the textmate
mailing list