Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
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
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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