Oh, certainly. If you mean "!open -a <weapon-of-choice>" as better
than e.g. ":maca raiseTerminal:" + config option?
I was more thinking of whether there are common cases of invoking
MacVim for one-offs, where providing a generic method of switching
back to the previous app would be useful (well, preferably the
invoking app, but I don't know how to track that).
(As admitted though, I don't really work like that myself today.)
On Wed, Feb 4, 2009 at 11:16 PM, Gregory Seidman
> Seems like overkill. How about !open -a Terminal
> On Wed, Feb 04, 2009 at 11:01:59PM +0100, Niklas Lindstr?m wrote:
>> Personally I work like that very rarely (although with a switch like
>> this I'd consider practicing it a bit more). I wonder if a macaction
>> for Command-Tab might do?
>> Say :maca switchApp:?
>> Manual version:
>> !osascript -e 'tell application "System Events"' -e 'keystroke tab
>> using command down' -e 'end tell'
>> (Autocommand:ed with VimLeave, or VimLeavePre if the last vim closes MacVim.)
>> (Hm.. This might be very useful for stuff like "It's All Text" as well..)
>> Best regards,
>> On Wed, Feb 4, 2009 at 10:15 PM, bj?rn <bjorn.winckler@...> wrote:
>> > 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