Skip to content

Instantly share code, notes, and snippets.

@jasonnoble
Forked from anonymous/gist:384798
Created April 30, 2010 13:41
Show Gist options
  • Save jasonnoble/385212 to your computer and use it in GitHub Desktop.
Save jasonnoble/385212 to your computer and use it in GitHub Desktop.
# Add command in TextMate
# Mapped to F1
# Update Path to File
Save: Nothing
Command(s):
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\""; }
Input: None
Output: Discard
Activation: Key Equivalent (F1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment