2

I use ediff-revision or vc-ediff to compare the current state of a file respect its working revision. I normally do not want to check the whole file but just the difference at or closest to the current position. However, ediff will always start from the beginning of the file. Is it there a way to force it to find the closest difference and open buffers A and B centered on that?

1

This is what I do. It almost answers your question.

Move the cursor in one of the buffers, say B, to a nearby difference zone (diff). Typically there is one nearby, and syncing there is sufficient.

Then hit g b, which means go to the current B difference. That puts both A and B on that same diff.

  • thanks, that helps, Drew. That to work for me it requires first marking where I want to go in buffer B, or remembering what to search for to get there, and then use 'g b'. Not ideal, but much closer to that than before knowing about 'g b'. – ramestica Jun 4 '17 at 15:00
  • If you really cared about automatically finding the nearest ediff difference zone to the cursor position, you could do that too (and then go there). In my uses, it's not hard to find the nearest diff. – Drew Jun 4 '17 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.