Thursday, June 24, 2010

Re: gvimdiff can not hightlight correctly the difference in a line

On Jun 23, 10:23 pm, Bram Moolenaar <B...@Moolenaar.net> wrote:
> You would have to run the diff algorithm on the lines.  It's not as easy
> as it seem to find a middle part that is equal, since you don't know
> where to start.
>

It's worse than that. Diff programs as a rule work line by line, and
only "sync up" when an entire line or more is the same in each file.
Some visual diff applications like kdiff3 allow setting manual sync
points, but in general, if many lines have been inserted or moved
around, it is quite likely that the two lines that are shown side-by-
side are completely unrelated. Calculating the common portions of
these lines would not just be difficult, it would be worthless.

I agree that this feature would be nice in the simple case of lines
that are nearly identical, but this simple case will not work in
general.

What I would like to see, is some way to get Vim to set manual diff
sync points. I'm not sure if that is possible while Vim relies on an
external diff tool, but I'm also not sure I'd like to see diff built
into Vim either.

--
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

No comments:

Post a Comment