I use this so I have the full project path in the title bar:

windowTitleFile    = '${TM_DIRECTORY:+${TM_DIRECTORY/\/path\/to\/project\///}}/$TM_DISPLAYNAME '
windowTitle        = '$windowTitleFile$windowTitleSCM'

I'd love it if I could make the path/to/project use the $TM_PROJECT_DIRECTORY though…

On Tue, 1 Nov 2016 at 20:16 Igor Kozlov <me@igorkozlov.me> wrote:
That would require the tabs to track and compare filenames, which I imagine can be expensive. And also, what if the parent directory also matches with the parent of a different file? With an option like windowTitle (I suggest tabTitle), TextMate doesn't have to make a best guess.

Getting the name of the directory the moment tab opens and keeping it in the memory is not expensive at all.
Then it's just comparing strings and deciding whether to show the directory name or not.
Since TM renders usually around 10 tabs max it should not affect performance.

I don't like the tabTitle option, because the majority of files are still pretty unique and don't need any additional detailing.

textmate mailing list