[TxMt] Language definition merge?
Allan Odgaard
allan at macromates.com
Sat Sep 10 22:43:29 UTC 2005
On 10/09/2005, at 21.20, Gerd Knops wrote:
> Are language definitions merged?
No -- I'd love to do so, but I don't see how this could be done safely.
> There are a few languages where I have some 'private' rules. Is it
> possible to write them in such a way that these are merged with
> whatever language definition is found 'higher up', so that I can
> easily enjoy updates from the svn repository without having to
> modify that definition each time?
You can do a stub, e.g.:
{ scopeName = "source.java.my-extension";
foldingStartMarker = "...";
foldingStopMarker = "...";
patterns = (
{ name = "my-private-rule.java";
match = "...";
},
{ include = "source.java"; },
);
}
Then select your stub for java files.
Starting with next build, rules are solely chosen based on order in
the grammar, so it'll then be possible to overload stuff in the
included grammar, even when the match is shorter than that in the
include.
More information about the textmate
mailing list