Can I attach a command to a project file so that it is only available when that project is open and foremost in TextMate? I'd like to write a command to rsync a project's files to a server, and give each project its own command to sync the proper directories to the right server.
Thanks, Shawn
On 25/10/2005, at 19.09, Shawn Van Ittersum wrote:
Can I attach a command to a project file so that it is only available when that project is open and foremost in TextMate?
No, but as Charilaos suggested, you can make the command use variables that you setup independently for each project.
I'd like to write a command to rsync a project's files to a server, and give each project its own command to sync the proper directories to the right server.
I have a generic command for this, I use the TM_PROJECT_DIRECTORY variable to figure out a path on the server.
E.g. to get the last path component of the project directory you can use ${TM_PROJECT_DIRECTORY##*/}.