Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have three Applications open, one window for each:

Google chrome

MacVim in server mode

iTerm2

How I can set up some keyboard shortcuts to focus this apps ?

One Idea is do it via Alfred 2 Powerpack, after double click ctrl, run the iTerm2 command, this will start the iTerm2 app when not running, or focus it when it is already open.

Same for Google Chrome with different shortcut.

But I have no idea how to focus MacVim, because the app alone will run always a new window (no --remote option) when run like the both above.

Is there a method to focus to an existing already open application ?

share|improve this question
    
I assume you're looking for something other than ⌘ tab, but I don't quite follow how. –  Daniel Lawson Aug 29 '13 at 1:01
add comment

1 Answer 1

See this question for different ways to assign shortcuts to opening applications.

When I tried using Alfred to assign a keyboard shortcut for MacVim, pressing the shortcut did not always open a new window. You could try using a script like this though:

tell application "MacVim"
    reopen -- open a new default window if there are no open windows
    activate -- make frontmost
end tell

Or try just using activate app "MacVim" or adding different arguments to open -a MacVim.

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.