On 28. May 2007, at 19:33, David Eriksson wrote:
#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
I mean achieve the same result without using "projects".
The TM_PROJECT_DIRECTORY will be set to the root folder in the project drawer.
If there are multiple entries at root level, it will be the nearest common ancestor of these, so e.g. adding a bunch of files from the same folder will have that folder as project directory.
As for the .textmate_init file CiarĂ¡n mentioned, it works for all but commands which use shebang.