On Apr 21, 2013, at 23:14, Phil Schumm pschumm@uchicago.edu wrote:
[…] Now in your example, what if 'art' were in the repository? Could I do the following:
{ begin = 'st'; end = '$'; patterns = ( { include = '#art'; } ); }
where in the repository I have
art = { name = 'meta.innert'; match = '\Gart'; }
Yes, that is functionally equivalent.
Finally, suppose 'art' were also valid at the beginning of a line? It seems like if I wanted to reuse the definition (including the scope), I would add:
{ begin = '^'; end = '$'; patterns = ( { include = '#art'; } ); }
Does that make sense? […]
An alternative would be to anchor the match to either BOL or end of last match, example:
art = { name = 'meta.innert'; match = '(^|\G)art'; }