[TxMt] Best approach to add new Scoping rules to grammar

Steve Lianoglou lists at arachnedesign.net
Mon Feb 12 04:47:08 UTC 2007


Hi,

I was wondering what the best approach to enable this functionality  
would be:

I use reStructuredText as the format of my doc strings in my python  
files, and so I'd like to enable the reStructuredText snippets,  
macros, etc. to fire in my python """ ... """ strings.

The scope of these strings in the Python files are:
     string.quoted.double.block.python

Should I just add this scope to all of the commands in the  
reStructuredText bundle, so all of the scopes for those commands  
would be changed to:
     text.restructuredtext, string.quoted.double.block.python

Or should I change the Python grammar to somehow set those two scopes  
for the """ ... """ string matching pattern (I'm not sure if you can  
do that, though).

Thanks,
-steve




More information about the textmate mailing list