Open GoogleCodeExporter opened 9 years ago
The --no-fork flag has nothing to do with MacVim's focusing behaviour. If you
want a window to hide after
you finish editing you have two options:
1. Set MacVim to hide when the last window closes
(MacVim->Preferences->General->After last window
closes...). This only works if there is no more than one window so is not all
that useful.
2. Set up an autocommand when you start 'mvim' to hide MacVim when _that_
window closes. This is covered
in the help file, see ":h macvim|/VimLeave"
Original comment by bjorn.winckler@gmail.com
on 11 Jan 2009 at 5:59
Thank you for the help.
As an additional note: this solution requires snapshot 35 or higher. The stable
release build does not support the
hide action on VimLeave events.
Thanks again.
Original comment by mark.m.f...@gmail.com
on 12 Jan 2009 at 5:39
[deleted comment]
I tried this suggestion #2 above, and I see how it works for a simple case of
one vim window, but the "hide:" hides all Vim windows, and for me that's
painful as I keep a lot of vim windows up in different desktops.
So now I'm using a different (and simple) approach that other's might find
useful:
I use the autocommand to run a script on VimLeave. Specifically, I've got this
in my .vimrc:
if has("gui_macvim")
au VimLeave * !sh ~/.vimleave
endif
Then, I only run macvim from the terminal via an alias - for me, the alias is
"v":
alias v="echo 'open /Applications/Utilities/Terminal.app; rm ~/.vimleave' > ~/.vimleave; mvim"
So, on exit, it runs a script that just opens (returns focus) to the Terminal
app. Its not perfect for multiple terminals, but could be modified to be
better. Really though, I just want to solve the iterative case where I enter
mvim from the terminal, then return to the terminal, and repeat - without ever
needing to use the mouse or hit command-tab or something else.
Original comment by ilikeles...@gmail.com
on 20 Sep 2013 at 11:57
I'd like to point out that TextMate (via the "mate" tool) and SublimeText (via
"subl") do what the author is asking for. It's really useful. I don't
understand why this is marked "invalid". Basically, it saves me from hitting
Command-Tab after I'm done with the edit job.
Original comment by kai.gros...@gmail.com
on 25 Apr 2014 at 9:16
Fair point. It is no longer marked "invalid".
Original comment by bjorn.winckler@gmail.com
on 26 Apr 2014 at 5:31
To persons following this bug: Does anyone have a workaround?
Original comment by joew...@gmail.com
on 6 May 2014 at 4:19
#7, I just hit Command-Tab...
Original comment by kai.gros...@gmail.com
on 6 May 2014 at 7:48
Original issue reported on code.google.com by
mark.m.f...@gmail.com
on 10 Jan 2009 at 10:06