Search code examples
vimdiffvimdiff

How to highlight only the actual differences in Vim diff?


When using vimdiff, it highlights the differing portion of the lines in a "greedy" fashion. That is, when comparing two lines:

Left window: This one is his home

Right window: That one is her home

then the whole line is colored pink, but on the left, is one is his and on the right at one is her parts are highlighted in red, as a mismatch:

This one is his home
That one is her home

How can I make vimdiff only highlight the actual differences?

This one is his home
That one is her home


Solution

  • Please visit https://github.com/rickhowe/diffchar.vim instead of https://github.com/vim-scripts/diffchar.vim. Thank you.