On 3 Nov 2016, at 14:02, George McGinley Smith wrote:
I'd love it if I could make the path/to/project use the $TM_PROJECT_DIRECTORY though…
You can, though the variable is projectDirectory and you must use the ${variable} syntax when putting variables (for TextMate to expand) inside of regular expressions.
So this should work:
windowTitle = '${TM_DIRECTORY:+${TM_DIRECTORY/^${projectDirectory}(?:/(.+))?/${1:+$1/}/}}$TM_DISPLAYNAME'
I added logic to only add path-separator (`/`) when there is more to `TM_DIRECTORY` than just the project directory.
You can use `$windowTitleSCM` as suffix for the above window title to get SCM info added (when present).
For the records, this is the default window title and related variables that can be re-used in custom window titles:
windowTitleSCM = '${TM_SCM_BRANCH:+ ($TM_SCM_NAME: $TM_SCM_BRANCH)}' windowTitleProject = '${projectDirectory:+ — ${projectDirectory/^.*///}}' windowTitle = '$TM_DISPLAYNAME$windowTitleProject$windowTitleSCM'