I'd like to bind a global keyboard shortcut to open AckMate within TextMate, even if I don't have TextMate open (open the most recent project in that case). How can I do this on Mac OSX?

  • Please explain how you want this to work. What project do you want to search? What do you want to have happen if there is no open project? On my system, TextMate does not reopen projects that were open when I quit it, so what do you want to be the object of the search window? If there is no project (or at least folder) open in TextMate, there's no AckMate option -- it's simply disabled. – Daniel Beck Jan 9 '12 at 22:35
  • Ok good point. I want to open the most recent project. Or if it's easier, let's just assume TextMate is open to a project. – mark Jan 9 '12 at 22:50

Open Automator, and select to create a new Service that receives No Input in Any application.

Add a single Run AppleScript action and paste the following code:

tell application "TextMate" to activate
tell application "System Events" to tell application process "TextMate" to tell menu bar 1 to tell menu bar item "Edit" to tell menu 1 to tell menu item "Find" to tell menu 1 to tell menu item "Search Project With AckMate..." to click

Save using any name, and assign a keyboard shortcut in System Preferences » Keyboard » Keyboard Shortcuts » Services.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.