On Tuesday, July 7, 2015 at 7:47:58 AM UTC-5, David Fishburn wrote:
> On Mon, Jul 6, 2015 at 11:02 AM, Ben Fritz <fritzophre...@gmail.com> wrote:
> 
> 
> The problem with both --remote-expr and --remote-send is if that Vim instance 
> is not already running, you get an error:
> 
> 
> 
> $ gvim.exe --servername DIFF --remote-send "echo 1"
> 
> 
> This one tells me the vim instance DIFF isn't running (which it isn't).
> 
> 
> $ gvim.exe --servername DIFF --remote-expr "echo 1"
> 
> 
> 
> Same with this one.
> 
> 
> 
> 
> That means someone must manually start up the Vim instance ahead of time.
> 

Oh, I missed that.

I used two separate "send to" entries for my solution, for that very reason. 
I'm not sure whether that works for you.

> 
> If you do the following:
> gvim.exe --servername DIFF
> gvim.exe --servername DIFF
> 
> 
> You get two instances of Vim running with server names of:
> DIFF
> DIFF1
> 
> 
> So in the 2nd case, my plugin notices we are not in the correct instance and 
> sends the files over to the first instance.
> 
> 
> That is why I cannot allow the DIFF1 instance to open the files, since they 
> will be edited in the DIFF instance.
> But yet I want the argument list that DIFF1 was started with, so I know which 
> files to send over to the DIFF instance.
> 
> 

What about if the second instance closes the files before sending them to the 
other instance? Or if your plugin opens without a swap file until it knows it 
is the correct instance?

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to