Vimdiff with multiple buffers

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Vimdiff with multiple buffers

Ven Tadipatri
I can run vimdiff with multiple files, but I'd like to be able to use
vimdiff's "do", "diffu" features.
When I try to run "do", it gives me (obviously) an error:
"More than two buffers in diff mode, don't know which one to use"

If I have 3 files, and I'm on the center one, how do I tell it to "do"
the one on the left vs the one on the right?
Or does vimdiff only work with 2 files?

Thanks,
Ven

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Vimdiff with multiple buffers

Ven Tadipatri
Hmm...I guess I should have read the manual first.
:diffget <number>
 seems to do the trick. So to answer my own question, I would do
:diffget 1 for the one on the left
and :diffget 3 for the one on the right.
But if anyone has any other useful pointers for using vimdiff, I would
appreciate it.

Thanks,
Ven


On Thu, Jan 21, 2016 at 2:35 PM, Ven Tadipatri <[hidden email]> wrote:

> I can run vimdiff with multiple files, but I'd like to be able to use
> vimdiff's "do", "diffu" features.
> When I try to run "do", it gives me (obviously) an error:
> "More than two buffers in diff mode, don't know which one to use"
>
> If I have 3 files, and I'm on the center one, how do I tell it to "do"
> the one on the left vs the one on the right?
> Or does vimdiff only work with 2 files?
>
> Thanks,
> Ven

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Vimdiff with multiple buffers

Simon Ruderich-2
On Thu, Jan 21, 2016 at 02:53:04PM -0500, Ven Tadipatri wrote:
> Hmm...I guess I should have read the manual first.
> :diffget <number>
>  seems to do the trick. So to answer my own question, I would do
> :diffget 1 for the one on the left
> and :diffget 3 for the one on the right.
> But if anyone has any other useful pointers for using vimdiff, I would
> appreciate it.

You can use the count argument for dp an do, e.g. 1dp and 2do,
see :h dp

I'd really like to get better support for changes inside a line
in Vimdiff. At the moment Vimdiff doesn't create minimal changes
in this case. I recall there was a plugin which helped with that,
but I forgot its name. Anybody has an idea?

Regards
Simon
--
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Vimdiff with multiple buffers

Christian Brabandt
Hi Simon!

On Fr, 22 Jan 2016, Simon Ruderich wrote:

> On Thu, Jan 21, 2016 at 02:53:04PM -0500, Ven Tadipatri wrote:
> > Hmm...I guess I should have read the manual first.
> > :diffget <number>
> >  seems to do the trick. So to answer my own question, I would do
> > :diffget 1 for the one on the left
> > and :diffget 3 for the one on the right.
> > But if anyone has any other useful pointers for using vimdiff, I would
> > appreciate it.
>
> You can use the count argument for dp an do, e.g. 1dp and 2do,
> see :h dp
>
> I'd really like to get better support for changes inside a line
> in Vimdiff. At the moment Vimdiff doesn't create minimal changes
> in this case. I recall there was a plugin which helped with that,
> but I forgot its name. Anybody has an idea?

linediff?

Best,
Christian
--
Wir sind zu allem fähig, aber zu nichts zu gebrauchen.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Vimdiff with multiple buffers

Gary Johnson-4
On 2016-01-22, Christian Brabandt wrote:

> Hi Simon!
>
> On Fr, 22 Jan 2016, Simon Ruderich wrote:
>
> > On Thu, Jan 21, 2016 at 02:53:04PM -0500, Ven Tadipatri wrote:
> > > Hmm...I guess I should have read the manual first.
> > > :diffget <number>
> > >  seems to do the trick. So to answer my own question, I would do
> > > :diffget 1 for the one on the left
> > > and :diffget 3 for the one on the right.
> > > But if anyone has any other useful pointers for using vimdiff, I would
> > > appreciate it.
> >
> > You can use the count argument for dp an do, e.g. 1dp and 2do,
> > see :h dp
> >
> > I'd really like to get better support for changes inside a line
> > in Vimdiff. At the moment Vimdiff doesn't create minimal changes
> > in this case. I recall there was a plugin which helped with that,
> > but I forgot its name. Anybody has an idea?
>
> linediff?

I'm surprised you didn't mention EnhancedDiff
(http://www.vim.org/scripts/script.php?script_id=5121).  I don't
think it looks inside lines, but it does a significantly better job
than the standard diff at aligning blocks of changed lines.

Regards,
Gary

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Vimdiff with multiple buffers

JohnBeckett
In reply to this post by Simon Ruderich-2
Simon Ruderich wrote:
> I'd really like to get better support for changes inside a line
> in Vimdiff. At the moment Vimdiff doesn't create minimal changes
> in this case. I recall there was a plugin which helped with that,
> but I forgot its name. Anybody has an idea?

diffchar gave excellent results when I used it at first:
http://www.vim.org/scripts/script.php?script_id=4932

However, after making a couple of minor edits and using :diffupdate the diffs were wrong. I forget exactly what the problem was, but I disabled the plugin when I missed seeing diffs that were not highlighted.

Fixing differences-within-a-line is badly needed, but a proper fix requires also fixing the problem that Vim cannot scroll very long lines. Diffs in a line are most needed when lines are very long (as in a paragraph of text), but such a line can only be displayed from its physical start and that prevents seeing diffs near the end of the long physical line.

I'm hoping someone will take up the suggestions mentioned in the following, and at the thread it links to:
http://vim.wikia.com/wiki/Vim_contribution_Ideas

John

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Vimdiff with multiple buffers

Anton Daneyko
In reply to this post by Simon Ruderich-2
Simon Ruderich <simon <at> ruderich.org> writes:

>
> On Thu, Jan 21, 2016 at 02:53:04PM -0500, Ven Tadipatri wrote:
> > Hmm...I guess I should have read the manual first.
> > :diffget <number>
> >  seems to do the trick. So to answer my own question, I would do
> > :diffget 1 for the one on the left
> > and :diffget 3 for the one on the right.
> > But if anyone has any other useful pointers for using vimdiff, I would
> > appreciate it.
>
> You can use the count argument for dp an do, e.g. 1dp and 2do,
> see :h dp
>
> I'd really like to get better support for changes inside a line
> in Vimdiff. At the moment Vimdiff doesn't create minimal changes
> in this case. I recall there was a plugin which helped with that,
> but I forgot its name. Anybody has an idea?
>
> Regards
> Simon

Dear Simon,

I have tried to use count arguments, but it does not work for me: I have
created three small test files and tried it there. I have made a 30 sec
screencast to show what I do: https://youtu.be/zWnYhX984PQ
I would appreciate it if you can give it a look and give me a hint about
why is this not working for me.

Best regards,
Anton




--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.