[TxMt] Simple questions about bundle creation

Alan Schmitt alan.schmitt at polytechnique.org
Sun Feb 12 11:33:57 UTC 2006


Hello,

I'm evaluating TextMate (coming from Vim) and I really like what I  
see. I'm now trying to create my first Bundle, to deal with some  
editing I do every week to create the Caml Weekly News. The format  
I'm using is xml, so I'd like to have a Bundle with the same language  
syntax, a few new snippets, and a command stolen from the HTML bundle.

About the language syntax, I'm a little confused by what the manual  
says (http://macromates.com/textmate/manual/ 
language_grammars#language_grammars) about scopeName:

"scopeName (line 1) — this should be a unique name for the grammar,  
following the convention of being a dot-separated name where each new  
part specializes the name. Normally it would be a two-part name where  
the first is either text or source, and the second is the name of the  
language or document type. But if you are specializing an existing  
type, you probably want to derive the name from the type you are  
specializing. E.g. Markdown is text.html.markdown and Ruby on Rails  
(rhtml files) is text.html.rails. The advantage of deriving it from  
(in this case) text.html is that everything which works in the  
text.html scope will also work in the text.html.«something» scope  
(but with a lower precedence than something specifically targeting  
text.html.«something»)."

So I tried a scopeName of "text.xml.CWN" to see if I would get XML  
like syntax hilighting for free, but it did not work. I had to do:

{	scopeName = 'text.xml.cwn';
	fileTypes = ( );
	patterns = ( { include = 'text.xml'; } );
}

including the text.xml language.

Is this the correct way to proceed?

Another question is about the presence of a support directory in a  
tmbundle (as there is one in the html bundle). Do they need to be  
created by hand in the Finder, or is there a way to add a Support  
file using the Bundle Editor?

My last question is about snippets: it seems that it's not possible  
to invoke a snippet while completing one (that is, in the middle of  
tabbing through all the fields to fill). Is it the case?

Thanks a lot,

Alan

-- 
Alan Schmitt <http://sardes.inrialpes.fr/~aschmitt/>

The hacker: someone who figured things out and made something cool  
happen.
.O.
..O
OOO




-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://lists.macromates.com/textmate/attachments/20060212/3539cb68/attachment.sig>


More information about the textmate mailing list