Hello everyone,
I posted an applescript to make it easy to open the current finder window in TextMate. Check it out here: http://www.bigbold.com/snippets/posts/show/1037
I attached a screenshot of my finder window so you can see how nicely it can be integrated into the finder.
Thought this might be useful to fellow TextMate users.
Cheerio, Simon
On 29/12/2005, at 14:53, Simon Dorfman wrote:
I posted an applescript to make it easy to open the current finder window in TextMate. Check it out here: [...]
That's very neat!
I changed “mate” to “open -a TextMate” in the script, so it wasn't dependant on proper PATH setup for the “mate” helper tool.
I also saved it as an Application Bundle (instead of just Application) to be able to give it a custom icon (I never really got the Finder's copy/paste of icons).
On 12/29/05 5:07 PM, "Allan Odgaard" throw-away-1@macromates.com wrote:
I also saved it as an Application Bundle (instead of just Application) to be able to give it a custom icon (I never really got the Finder's copy/paste of icons).
I've attached a short screen capture movie showing how to do the Finder copy/paste of icons.
Could you explain the Application Bundle way of doing it? I'm curious how it works. I tried this:
$ cd ~/Library/Scripts/Applications/Finder/open\ in\ TextMate.app/Contents/Resources/ $ rm droplet.icns $ cp /Applications/TextMate.app/Contents/Resources/TextMate.icns droplet.icns
...but that doesn't change the icon in Finder. Is there something else I need to change?
On 1/1/2006, at 9:50, Simon Dorfman wrote:
I've attached a short screen capture movie showing how to do the Finder copy/paste of icons.
Thanks -- I'd missed that selection bit.
Could you explain the Application Bundle way of doing it? I'm curious how it works. I tried this:
$ cd ~/Library/Scripts/Applications/Finder/open\ in\ TextMate.app/Contents/Resources/ $ rm droplet.icns $ cp /Applications/TextMate.app/Contents/Resources/TextMate.icns droplet.icns
...but that doesn't change the icon in Finder. Is there something else I need to change?
Try: touch ~/Library/Scripts/Applications/Finder/open\ in\ TextMate.app
That'll update the date stamp on the actual application bundle, which is generally required for Finder to re-cache the icon.
On 1/1/06 2:38 PM, "Allan Odgaard" throw-away-1@macromates.com wrote:
Try: touch ~/Library/Scripts/Applications/Finder/open\ in\ TextMate.app
That'll update the date stamp on the actual application bundle, which is generally required for Finder to re-cache the icon.
Yes, that did it.
I noticed something very strange though. If I save the script as an application bundle, it behaves slightly different than when I save it as an application. When dragging a file (not a folder) onto it, TextMate opens the folder containing that file, rather than just the file. I wonder if it has something to do with the fact that the script is saved to ~/Library/Scripts/Applications/Finder/open in TextMate.app/Contents/Resources/Scripts/main.scpt instead of just ~/Library/Scripts/Applications/Finder/open in TextMate.app.
I would prefer to use the application bundle method because it seems more stable. (Once, Finder crashed and when it started again, my "open in TextMate.app" had lost it's TextMate icon.) But I don't know how to get this working. Anyone have an idea?
On 1/2/06 4:23 PM, "Simon Dorfman" emaillists@simondorfman.com wrote:
If I save the script as an application bundle, it behaves slightly different than when I save it as an application. When dragging a file (not a folder) onto it, TextMate opens the folder containing that file, rather than just the file.
I think I spoke too soon. This same strange behavior is now also happing with the version saved as an application. TextMate take longer than usual to open the folder, rather than the file. Maybe it's time for a reboot.
On 1/2/06 4:34 PM, "Simon Dorfman" emaillists@simondorfman.com wrote:
I think I spoke too soon. This same strange behavior is now also happing with the version saved as an application. TextMate take longer than usual to open the folder, rather than the file. Maybe it's time for a reboot.
Sorry to keep responding to my own posts, but I'll post this in case anyone else is interested. I figured out the problem. The applescript code I borrowed for this was doing something fancy to get the path to the folder, not the file. I don't know why it seemed to work sometimes with a file. Attached is the final version of this script.