Friday, June 29, 2012

Re: How did I get two instances of vim?

On Jun 29, 2012 at 08:12 AM -0400, Eric Weir wrote:
>Or, more importantly, how do I get rid of the second?

The second session might have already been closed. Or crashed, or just
improperly shut down. Who knows without looking at your computer. As
long as you don't have any vim instances running in a terminal somewhere
that you've forgotten about, or MacVim windows that you might have
minimized and forgotten about, it's probably fine to ignore the warning.

You could use Activity Monitor to search for running or hung instances
of vim if you are concerned, and (force) quit them from there.

>Didn't understand what it was telling me at first---because I *assumed*
>I did. Just realized this means I've got two sessions of vim running.

In my experience, starting up vim from scratch results in an instance
called VIM. Starting up a second one creates an instance called VIM1.
In MacVim, these instance (server) names are in the title bar of the vim
window. Presumably your only MacVim window currently says 'VIM'. If
you open up more OS X windows, not vim panes, windows, or tabs, but
windows in the OS, you start a new instance. Do you have multiple
windows that you opened with command-N or through the 'New Window'
command in the File menu? If so, you have multiple vim instances
running. Each OS X window in MacVim is it's own vim instance.

>How do I get rid of the second instance?

If it's still running somewhere in some window, just quit it. If it's
not running anywhere and the message is the result of improper session
cleanup, remove ~/.vim/sessions/default.vim.lock. Or just follow the
instructions of what session told you to do:

> Use :OpenSession! to override.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: