[TxMt] Re: Recursive parsing?
Andreas Pardeike
ap at fsys.se
Thu Apr 9 06:48:48 UTC 2009
On 8 apr 2009, at 21.34, Allan Odgaard wrote:
> On 8 Apr 2009, at 10:42, Andreas Pardeike wrote:
>
>> Can I customize Textmate so its html and php modules identify my
>> regions?
>
> Yes, look at the ‘include’ rule key: http://manual.macromates.com/en/language_grammars#rule_keys
Great. Much improved since I looked last. My grammar def looks like
this:
{ scopeName = 'text.html.basic';
fileTypes = ( );
foldingStartMarker = '<(php|htm)>$';
foldingStopMarker = '^\s*</(php|htm)>';
patterns = (
{ contentName = 'source.php';
begin = '`|<php>\s*?\n?|</htm>\s*?\n?';
end = '`|\s*<htm>|^\s*</php>|</php>';
patterns = ( { include = 'source.php'; } );
},
);
}
Question: I don't get syntax coloring for the two scopes though. Is this
possible?
/Andreas Pardeike
More information about the textmate
mailing list