[TxMt] Edit in TextMate service

Allan Odgaard allan at macromates.com
Sun Nov 7 15:20:36 UTC 2004

I created a service that adds “Edit in TextMate” to the Services sub 
menu. The key equivalent is command-escape (but there's an OS bug which 
requires the menu to have been open at least once before the key 
equivalent works).

It opens a TextMate window with the selected text, when you save and 
then close the TextMate window, the modified text will be sent back to 
the application.

There's currently a 3 hours timeout (the application will have the busy 
wheel until you close the TextMate window).

Place the service in ~/Library/Services -- you need to log out/in for 
the services menu to be rebuilt. If you launch the service manually, 
the service should be available for new programs or programs which 
hadn't already had the services menu built (but restart if it doesn't 

If you use the service from within TextMate, it may hang (until you 
manually break the service) -- I'll add a workaround for this.

It currently can only handle one edit task at a time, and it requires 
at least version 1.0.2b3 of TextMate.

The reason that it's an external service and not built into TextMate 
has to do with the way services work -- I may be able to find a 
combined solution later.

It uses a temporary file for exchanging the text, this is always named 
“Data from <application>.txt” and placed in “/tmp/<uid>/TemporaryItems” 
-- it doesn't remove the file afterwards and it doesn't ensure that the 
file didn't already exist.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TextMate.service.zip
Type: application/zip
Size: 23476 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20041107/ddb26960/attachment.zip>
-------------- next part --------------

More information about the textmate mailing list