3

I'm trying to understand how vimdiff work.

Here I tried to diff two simple files. The 1st:

abcdefghijklmnopqrstuvwxyz

foo

abcdefghijklmnopqrstuvwxyz iii

bar

The 2nd:

abcdefghijklmnopqrstuvwxyz

abcdefghijklmnopqrstuvwxyz

Here is result from diffmerge utility:

enter image description here

And here is result from vim:

enter image description here

Note that vim doesn't see the similarity between abc...xyz and abc...xyz iii lines and doesn't arrange them visually on one line.

Is there some settings to improve vimdiff in such cases?

2
  • 4
    Try the diffchar plugin. It might improve things.
    – muru
    Apr 9, 2016 at 17:14
  • I tried it, unfortunately does not work. It cannot find the best matching lines.
    – matec
    Apr 7, 2022 at 20:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.