[TxMt] naming embedded (included) scopes ?

Dirk van Oosterbosch, IR labs labs at ixopusada.com
Sun Apr 9 13:22:28 UTC 2006


Hi,

After a lot of reading the documentation on textmate language  
bundles, grammar and scopes and regular expressions, I (just|finally)  
began making my own bundle for the cheetah templating language. My  
first post on this list is the following question:
How can I name the scope from when I include an other language in my  
language bundle?

To explain this a bit:
My quest comes forth out of an esthetic desire to color the  
background of embedded html in the cheetah template, just like the  
"Embedded source" scope 'text source, string.unquoted' can colorize  
the embedded javascript or css in a html document.

In my cheetah language grammar I have a pattern:
		{	name = 'source.embedded.html';
			include = 'text.html.basic';
		},
But in the document, the scope (ctrl shft P) just says  
"source.cheetah", or "source.cheetah meta.tag.structure.any.html"  
when my caret is within a html tag. I don't see anything of that name  
'source.embedded.html' reflected in the scope.

Is it possible to give an embedded (or included) language an extra  
scope layer name, so I can use that in a theme?
I tried 'source.cheetah source.embedded.html' but that didn't do  
anything. For now I use 'source.cheetah meta', but that means I am  
missing a lot of non-cheetah-html stuff, like html comments, or (in  
html) embedded css or javascript.

I hope that my question is somewhat clear.
thnx
dirk


-----------------------------
Dirk van Oosterbosch
de Wittenstraat 225
1052 AT Amsterdam
the Netherlands

http://labs.ixopusada.com
-----------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060409/7e134d0f/attachment.html>


More information about the textmate mailing list