> This was recently merged to Neovim 
> (https://github.com/neovim/neovim/pull/14537?fbclid=IwAR2QVeuXcCjZ6-Q5_UUmxBe076CxJixfVrztunS92VzjW0w9HyeX4zU09sM).
>  Are you interested in merging it to vim if I update this pull request?

As I mentioned before, it's certainly an area where improvement is
desired.  I haven't had time to look at the details though.

We should distinguish a few goals for optimizing how it works.  Perhaps
it's possible to do this without an option, but it might be needed to
have the user pick a priority of what is most important for the current
view.  This is an important decision for how to optimize the algorithm.

The three-way merge seems like something that is very useful for version
control work.  There it must be prioritized to see the
original/current/new-version aligned in a way the user can easily decide
which text to end up with.  This is tricky, since some text may just
have some internal changes (e.g. a variable was renamed), some may be
reordered, some may be added and some may be removed.  Aligning on
"helper lines" would work well for this (those are lines with block
markers, such as { and }, empty and comment lines, and other lines that
don't contain functional code).

The second goal is to just see "what changed".  The first screen shots
in this PR are a good indication: Instead of having a block of different
lines and then a block of added lines, finding the added lines where
they probably were added looks much better.  As I mentioned before,
giving indent changes a low priority probably also helps a lot here.
I often add "iwhite" to the 'diffopt' option to get close to this kind
of display.

I'm not sure about the example where all three buffers have three lines
that differ.  Making the diff higher than three lines because it seems
they are different lines, instead of slightly changed lines, is a bit
doubtful.  How can you decide two lines are too different to consider
them to be changed instead of replaced?

-- 
hundred-and-one symptoms of being an internet addict:
39. You move into a new house and setup the Wifi router before
    unpacking any kitchen stuff.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" 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_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221112010040.4925B1C0473%40moolenaar.net.

Raspunde prin e-mail lui