Is there a kdiff3 equivalent on the command line that allows selective merging?

kdiff3 is a GUI comparison tool that allows you to create diff of two / three files and selectively select which lines make up the combined file. Is there a command line equivalent?

+4
source share
2 answers

You must try

vimdiff file1 file2 

Example:

enter image description here

You can select lines (from command mode to visual) with shift + v , copy with yy , paste with p and switch to files with ctrl + ww

See http://vimdoc.sourceforge.net/htmldoc/diff.html

+5
source

Yes, vimdiff (link to a quick tutorial) is not bad. As part of VIM, you will need to explore the key touches that you need to accept or discard changes.

+1
source

Source: https://habr.com/ru/post/1479444/


All Articles