Tuesday, July 7, 2015

Re: Diff mode via Tabs



On Mon, Jul 6, 2015 at 11:02 AM, Ben Fritz <fritzophrenic@gmail.com> wrote:
On Monday, July 6, 2015 at 10:01:31 AM UTC-5, Ben Fritz wrote:
> On Friday, July 3, 2015 at 2:20:06 PM UTC-5, David Fishburn wrote:
> > Now, what I _really_ want it to do is this:
> >
> >
> > C:\Vim\vim74\gvim.exe --servername gDiff  +":RemoteDiffFiles %1"
> >
> >
> >
> > In other words, do not let Vim "edit" the file, but pass the filename in as a argument to my command.
> >
>
> That's what I suggested --remote-expr for. :-)

Posted to quickly. --remote-send would also work, if you want to use an ex command instead of a function (or if it turns out to be easier).

Yes, I remember, but I indicated that cannot be used.

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.

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.

David
 

--
--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: