[TxMt] Re: Default TM_PROJECT_DIRECTORY

Jon Clayden jon.clayden at gmail.com
Wed Sep 12 14:32:43 UTC 2012


Dear Allan,

Many thanks for the quick reply.

>> […] why the TM_PROJECT_DIRECTORY isn't set to the top-level directory by default?
>
> The project directory never changes for a project, the file browser can change a lot, be hidden, show non-folders (e.g. SCM status). So while it would make sense to allow setting the project directory from the file browser, it doesn’t make sense to treat the file browser as always showing/knowing the project directory (also, what would Go → Project Folder do, if the file browser defined the project folder? ;) ).

Yes, OK - that makes sense. But then might there be a case for
introducing a new TM_* variable representing the current top-level
directory in the file browser, if there is one?

> If all your projects are e.g. in /Users/me/Projects then it might also be possible to create:
>
>     # /Users/me/Projects/.tm_properties
>     projectDirectory = "${TM_FILEPATH/(\/Users\/me\/Projects\/[^\/]+).*/$1/}"

In the meantime I will use this. Many thanks for the suggestion.

All the best,
Jon


More information about the textmate mailing list