[TxMt] Re: [TM2] Visibility of current file browser root
Allan Odgaard
mailinglist at textmate.org
Tue Dec 20 09:34:00 UTC 2011
On 20 Dec 2011, at 01:22, John Whitley wrote:
> […] I've not had any luck in recreating TM1's behavior. For example, in ~/.tm_properties I have:
>
> windowTitle = '${TM_DISPLAYNAME}\
> ${TM_PROJECT_DIRECTORY:+ - $TM_PROJECT_DIRECTORY}'
>
> and in a project root directory, I have .tm_properties with:
>
> projectDirectory = '${CWD}'
>
> After restarting TextMate (is there an easier way to reload the
> props?),
The props are automatically reloaded but cached for upto 30 seconds, so relaunch (⌃⌘Q) is probably easiest if you’re unpatient.
> it seems that TM_PROJECT_DIRECTORY is never set
Correct, but you can use $projectDirectory or $CWD.
> […] is this a bug?
The reason is that TM resolves the .tm_properties files and use your setting for projectDirectory to set TM_PROJECT_DIRECTORY for command execution. So this variable does not exist prior to resolving the files, nor is it set during, as it’s a general-purpose free-form system, and you set projectDirectory not TM_PROJECT_DIRECTORY.
The main reason that I didn’t make people set the latter in .tm_properties is that the variable has a fallback if projectDirectory is unset.
More information about the textmate
mailing list