Re: How did I get two instances of vim?
Eric Weir <eeweir <at> bellsouth.net>
2012-06-30 10:39:31 GMT
On Jun 29, 2012, at 11:38 AM, Tim Gray wrote:
> .... You have swap files sitting around. You get warnings when you try to open a file and there is a swap file
for it already. Vim makes swap files when you open a file. It's supposed to remove them when you close a
buffer. If the buffer hasn't been closed properly (vim crashes, you lose power, or something else), then
the swap file doesn't get deleted and you get warned the next time you open that file..... Another common
reason to get that warning is if you start editing a file that is already open by another instance of vim.
> The question is why is why do you have swap files sitting around?
I haven't a clue. None of the suggestions above ring a bell. I don't think vim has ever crashed for me, I always
write my files before quitting vim, etc., etc.
> The processes in Activity Monitor are not necessarily all separate instances of Vim. When I start up
MacVim, I get one process named MacVim and two named Vim. Opening up a new instance (VIM1), gives me one
extra process named Vim in Activity Monitor.
> I didn't bring up Activity Monitor as a way for you to count Vim instances. It was a way to make sure that you
could have nothing related to vim running. Quit Vim. Then check Activity Monitor for anything called vim
in there. If you've quit all instances of vim, there shouldn't be anything there related to vim. Then you
can start from a clean slate.
Don't know if I've ever seen a process called MacVim when I start MacVim. Yesterday and today, at least, they
been called Vim, Vim!, or Vim2. As I recall, in beginning to work with your suggestions yesterday, I
believe I had three processes called Vim running after I had quit vim.
>> I'm wondering if the way I've been using vim-session is part of, or all of, the problem. Do I need to close
the session before quitting vim?
> That would make sense to me. I'm not sure if the lock file is cleaned up if you don't close the session. I've
not looked at the code to check. I also don't particularly care because I just use :CloseSession when I'm done.
Yes, the lock file goes away when you close the session. Since starting to close the session prior to
quitting vim I've not had multiple instances of vim or persisting swap files.
> You seem to think all of your problems are always from whatever plugin you are running. I would look into why
a newly started MacVim instance is starting as VIM1 and not VIM. I don't think that's a session thing. I also
don't think it's a session thing that you have swap files scattered about. That sounds like something
related to improper shut down to me.
Again, I could be overlooking something, but none of your suggestions---improper shut down,
etc.---rings a bell. All I know is when I deleted all those swap files and started closing the session
before quitting vim, I haven't had the problem.
> If you completely quit vim and restart it, you should have a vim server running with the name VIM (on MacVim
at least). If it's something else, like VIM1, something funny is going on - Vim must seem to think instance
VIM is occupied. This isn't a session thing (most likely).
I'm puzzled how there could be instances of vim running that don't show up anywhere, at least in the places I
would expect them---in the menu bar, minimized on the desktop, in Activity Monitor.
Bottom line, the symptoms have been eliminated, though the problem, the underlying reason, has not been
Even that much would not have been possible without your feedback.
eeweir <at> bellsouth.net
"Everywhere the crisis of the private financial system
has been transformed into a tale of slovenly and overweening government
that perpetuates and is perpetuated by a dependent and demanding population."
- Marilynne Robinson
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