schussman.com logo

Replacing Edit in TextMate with QuickCursor

After upgrading to Snow Leopard on my MacBook, I found that the Edit in TextMate hook wasn’t working. There were a few threads about re-enabling it, but nothing definitive, and the support page suggests either running any target applications (those in which you want to use Edit in TextMate) in 32-bit mode, or perhaps trying some uninstall-reinstall voodoo. Since neither of these were ideal, I thought I’d try the “last-resort” suggestion, QuickCursor.

After a few minutes of use, QuickCursor seems to me to be a great improvement over Edit in TextMate — far from an “if everything fails” option, I prefer it for most of my uses.

  1. Installation is easy. Download, copy to Applications folder, and run it.
  2. Configure: I set it to load on bootup, and it automatically found TextMate as one of my editor options. I assigned TextMate the same keyboard shortcut that Edit in TextMate once occupied (cmd-ctrl-E).
  3. Use! From a Safari field, hit the shortcut and up pops a TextMate window; edit away, save, and your text appears in the Safari field. So far, just like Edit in TextMate, with the added bonus of being uncomplicated and functional in Snow Leopard. But here’s where it improves on the original: Edit in TextMate required the “target” window to be in focus in the target application; that is, when using Safari with multiple tabs open, the tab with the target “edit in” field had to be the active tab. This meant that if you opened an “edit in” TextMate window, then flipped through a few tabs to find something, you would have to relocate the target tab before being able to save from the TextMate window. QuickCursor doesn’t have this limitation: You can open multiple editing windows from multiple tabs, edit any/all of them, and save your edits without worrying about which application or tab is in the foreground. Bingo!

There are a couple of important caveats to QuickCursor that may make it not an ideal solution for some users (my bolds):

QuickCursor depends on two technolgies. For reading/writing data from the original application is uses the accessibility api. The nice thing about that API is that it’s not a hack, it’s a supported API. But unfortunatly not all views support the accessibility api (at least not read/write of the text content). And in particular webkit views don’t support it. And that means that tools that use webkit as their editor (such as Mail.app) won’t work with QuickCursor.

That means that Firefox doesn’t work with QuickCursor, either, since it doesn’t use the accessibility API. Since I’m a Safari user, and never much used Edit in TextMate for Mail, QuickCursor is pretty spot-on ideal for me.