Web Dev Notes

Blog about web development by Robert Dawson

Open selected text in TextMate with Automator

Like most developers with a Mac I presume, I love TextMate! One of the things I have often wanted to do is to select text in an application and paste it into TextMate. Thanks to Aaron at 9thport.net, here is a dead-simple solution!

Steps

  1. Open Automator.
  2. Make a new Service script.
  3. Add Run Shell Script.
  4. Write "cat | mate" and save as "Launch TextMate".
  5. Open System Preferences.
  6. Go to Keyboard > Services.
  7. Check Launch TextMate and give it a shortcut, like F6.
  8. Go to an application with text, select it, and hit F6!