[TxMt] Questions regarding Language grammars

Michael Sheets mummer at whitefalls.org
Fri Nov 17 12:07:07 UTC 2006


> 1) Is there a way to have two language grammars working on one  
> language?
> As an example: There's the language grammar Latex in the Latex-Bundle
> I have an additional bundle for own snippets and commands. Sometimes
> I'm coming along a need for having something added to the
> Latex-language grammar and I would like to Hotfix it w/out breaking it
> with the next update (or as I just noticed I couldn't even change the
> grammar). For this I would like to have in my own bundle a
> Latex-language grammar which includes only the hotfixes and works
> together with the rest of the language grammar of the Latex-Bundle. Is
> this possible?

It depends on the language, and what you want to add. Basically the  
way you can do it is to have a grammar with your rules in it, then at  
the bottom include the Latex grammar. Being that your rules are  
higher they will take precedence. However anytime a begin/end rule in  
the Latex grammar is descended into only it's patterns array is  
active, so inside that your rules wouldn't be active.

> 2)What's the best way to edit stuff in the bundle editor? Right now
> I'm using for longer stuff always "Edit in Textmate" - is there
> anything else for getting the comfort of Textmate while editing
> snippets, commands and so on?

That's the recommended way.



More information about the textmate mailing list