[TxMt] foldingStartMarker foldingStopMarker Question

Hans-Jörg Bibiko bibiko at eva.mpg.de
Fri Jan 11 16:26:21 UTC 2008


Hi,

maybe someone is able to give me an hint (esp. regexp and grammar  
experts ;)

I'm writing a Language and I want to include TM's folding feature.

foldingStartMarker :=
each line which begins with '>' AND the next line does not begin with  
'>'

foldingStopMarker :=
each line which does not begin with '>' AND the next line begins with  
'>'

Fine.

I tried:

foldingStartMarker = '^>[^\n]*$(?!\n>)';

foldingStopMarker = '^[^>][^\n]*$(?=\n>)';

but it does not work. If I test these regexps in Find&Replace Dialog  
it works.
What am I doing wrong? Or is this not possible?

Here's an example how it should look like:

v > foo
^ blabal
   > foofoo
v > foofoofoo
   blablabla
   blablabla
   blablabla
   blablabla
^ blablabla
v > bla
^ foo
   >

whereby 'v' := foldingStartMarker ; '^' := foldingStopMarker


Many thanks in advance,

--Hans



More information about the textmate mailing list