[TxMt] Re: Code folding regexp

Allan Odgaard mailinglist at textmate.org
Wed Oct 14 12:42:00 UTC 2015


On 14 Oct 2015, at 19:38, Carpii UK wrote:

> Im trying to add code folding regular expressions for a templating language
> I use
>
> Even if I pare it back to the most basic of examples, I cant seem to get it
> working..
>
> {if (true)}
>   {foo}
> {/if}
>
> foldingStartMarker = '^\{if\}';
> foldingStopMarker = '^\{\\if\}';

Based on your example, I think it should instead be:

    foldingStartMarker = '^\{if.*\}';
    foldingStopMarker = '^\{/if\}';


More information about the textmate mailing list