[TxMt] Extending Built In Languages...

Thomas Aylott - subtleGradient textmate at subtleGradient.com
Tue Dec 18 16:42:15 UTC 2007


On Dec 18, 2007, at 2:00 AM, Eric Coleman wrote:

> Hi Everyone,
>
> What I want to do, is extend the css & js definitions to have  
> alternate start / end tags...
>
> For javascript, I want to match the normal <script></script> tags,  
> but I also want to have it use
>
> <?php $this->js()->start() ?> / <?php $this->js()->end() ?>
>
> (Same for css, except using "css()")
>
> How can I go about doing this?
>
> Regards,
> Eric

This functionality is actually in the HTML language syntax itself.
Make a copy of the HTML language and move it to your personal bundle  
(make one if you don't already have one).

Read up on the documentation for how to make your own rule that will  
include another language from within the another.
	For an example, look for a line that contains "include" and  
"source.js".


—Thomas Aylott – subtleGradient—




More information about the textmate mailing list