Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

MacVim has a preference item under "General > After last window closes" that gives the option to Hide MacVim. This returns focus to the terminal after the last MacVim window is closes via :q.

I'd like to add this preference to my dotfiles, either via an entry in my vimrc or via directly manipulating the OSX user preferences database via "defaults write org.vim.MacVim..."

How can I do this?

share|improve this question
up vote 1 down vote accepted

See :help macvim-user-defaults for a list of dictionary entries. The right one is not listed, though:

share|improve this answer
Thanks. The complete line I ended up using is defaults write org.vim.MacVim MMLastWindowClosedBehavior -int 1. – sbc Oct 5 '12 at 16:47

Your Answer


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.