Hi,
Here's a general situation that I run into all the time: I'm in
Terminal and type 'mvim' to open a file to make one small change and
then close it again. When I close the window I need to manually
switch back to Terminal with Cmd-Tab even though the Terminal window
is layered right under the MacVim window I just closed (Mac OS X will
raise another MacVim window even if it is layered below the Terminal
window, which I guess is the correct behavior for most programs but in
this instance it is a nuisance).
I've been searching for a way to figure out which app the window under
the topmost MacVim window belongs to and then switch to the app that
owns that window when I close my MacVim window, but I cannot find any
way of doing this. So, I came up with another (not very elegant)
idea: add an action called "raiseTerminal:" and call that when the
window closes by starting MacVim like this:
mvim -f -c "au VimLeave * maca raiseTerminal:"
(I am already doing this more or less, but I call "hide:" instead but
it is kind of annoying if there are other MacVim windows open as they
will be hidden. By the way, the above command (with "hide:") is what
I set my EDITOR environment variable to so that MacVim pops up when I
edit Git commit messages.)
An obvious extension the above idea is to add a user default so that
you may choose which app "raiseTerminal:" actually will raise (e.g.
iTerm).
Does anybody have any better ideas on how to deal with this problem?
Would anybody find the above functionality useful (I would use it all
the time with EDITOR).
Björn
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_mac" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---