[TxMt] Recreating bbinclude in TextMate?

Brad Choate bchoate at gmail.com
Tue Aug 8 23:24:48 UTC 2006


The #relative# placeholder is supported now, with the latest version  
of the HTML bundle from macromates.com's subversion repository. The  
placeholder assumes the root of your project directory is the root of  
your site, for relative location. So if your project looks like this:

     about/
         index.html
     images/
         logo.jpg
     tmpl/
         header.ttmpl

And you have an index.html file in the 'about' directory, that says...

     <!-- tminclude file="tmpl/header.tmpl" #title#="About Us..." -->

With header.tmpl under the 'tmpl' directory containing this...

     <img src="#relative#images/logo.jpg" class="logo" />
     <h2>#title#</h2>

That would expand within the index.html file as

     <img src="../images/logo.jpg" class="logo" />
     <h2>About Us...</h2>

-Brad


On Aug 7, 2006, at 12:21 PM, Peder Axensten wrote:

> On 5 aug 2006, at 05.29, James Edward Gray II wrote:
>
>> On Aug 4, 2006, at 11:53 AM, Brad Choate wrote:
>>
>>> I had thought of generalizing it further... but what other  
>>> documents would be likely to use it? Most scripting languages  
>>> should be using their native include/require commands instead of  
>>> something like this, IMHO.
>>
>> Hmm, you do have a very good point there.  Perhaps it isn't needed.
>
> I would certainly find very good use for it in both LaTeX and  
> Matlab. There are ways to call other files, but often I need to  
> deliver everything in one file. Oh, I'd love it!
>
> BTW, the BBEdit placeholder #relative# is ignored?
>
> /Peder Axensten
>
>
>
> ______________________________________________________________________
> For new threads USE THIS: textmate at lists.macromates.com
> (threading gets destroyed and the universe will collapse if you don't)
> http://lists.macromates.com/mailman/listinfo/textmate




More information about the textmate mailing list