I have three Applications open, one window for each:

Google chrome

MacVim in server mode


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 ?

  • I assume you're looking for something other than ⌘ tab, but I don't quite follow how. – Daniel Aug 29 '13 at 1:01

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .