/ Published in: Bash
Instructions
- Create a new Command: Bundles > Bundle Editor > Edit Commands
- Click the "+" button to add a new command
- Give your command a descriptive name ("TM Path in title", for example)
- Set the following properties on the command: {save:Nothing, Input:None, Output:Show as Tool Tip, Activation:⌥⌘T, Scope Selector: NULL}
- Close the command window
- Test out a document inside a project. The title should be replaced with an absolute path based on the root directory of your project.
Feedback and improvements are absolutely welcome. I'm looking to find a way to automatically fire this when a document is opened. Anybody know if this is possible?
Expand |
Embed | Plain Text
#!/bin/bash A=${TM_PROJECT_DIRECTORY:-""} B=${A##*/} C=${TM_FILEPATH:-""} D=${C/$A/\/$B} [[ ! -z $C ]] && { osascript -e "tell application \"TextMate\" to set name of window 1 to \"$D\""; } :
Comments
Subscribe to comments
You need to login to post a comment.

You could change the activation key to ⌘ + S so when the document is saved it will set the path.