[TxMt] Language Grammar - TM's internal markups

Hans-Jörg Bibiko bibiko at eva.mpg.de
Tue Jul 24 08:23:27 UTC 2007


Hi,

I have two questions regarding to the internal language grammar.

1) Is it possible to look for the internal markups which TM is using  
like
"<support.function.perl>(.*?)</support.function.perl>"
directly?
I only know the way to use the 'magic keyword' in a tmCommand  
"<key>inputFormat</key><string>xml</string>" and parse the output.

2) Is there a way to modify the current language grammar dynamically?
Example:

{	scopeName = 'text.plain';
	fileTypes = ( '' );
	patterns = (
		{	name = 'my.tag';
			match = '(a)';
		}
	);
}

Then I write a command or what ever to change
			match = '(a)';
in
			match = '(b)';

If I do so I have to quit TM and restart it. A 'Reload Bundles'  
doesn't work.
[I don't know whether it is possible to write an Applescript to  
control TM in that respect.]

2a)
Or to use an external file which holds the actual 'match' expression  
for a given pattern.

2b)
Or to change the current used language grammar by using a tmCommand.


Many thanks in advance,

Hans



More information about the textmate mailing list