[TxMt] relative project path (for bundles), without a project

Ciarán Walsh ciawal at gmail.com
Mon May 28 17:12:53 UTC 2007


On 28 May 2007, at 17:51, David Eriksson wrote:

> But this isn't really a project since we have no .tmproj file.
>
> Anyway, two questions
>
> #1
> Is there a $TM_... path that can tell me the top-level directory  
> for the open window?
For a project yes, TM_PROJECT_DIRECTORY

> Reason I'm asking is that some bundles, (just tried the AS3 one)  
> depends on knowing the "root folder". They should just assume that  
> we wanna use the currently opened dir (if one).
I don't use the bundle so can't comment on this.

> #2
> Any alternative way of adding "tm shell variables" to a directory.
> Like the ones in project.tmproj -> shellVariables -> ..
You can make a file called .textmate_init in the project root  
directory. This is a shell script which is executed before commands,  
so you should use e.g.

export TM_DB_USER=projectuser

However – due to an implementation detail these values won't be  
available for all commands so you might get some confusing results.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20070528/5ba4188d/attachment.html>


More information about the textmate mailing list