kdiff3 is a GUI diff tool that allows you to create a diff of two/three files and selectively choose which lines make up the merged file. Is there a command-line equivalent?
Asked
Active
Viewed 2,125 times
2 Answers
6
You should try
vimdiff file1 file2
Ex :
You can select lines (from command mode to visual mode) with shift+v, copy with yy, paste with p and switch into files with ctrl+ww

Gilles Quénot
- 173,512
- 41
- 224
- 223
-
To navigate: `]c` next change, `[c` previous change, `dp` 'diff put' to other buffer, `do` 'diff obtain' from other buffer – 79E09796 Oct 06 '16 at 16:16
2
Yes, vimdiff (quick tutorial linked) is quite good at it. Being part of VIM, you will have to learn the key strokes you need to accept or refuse changes.

Stefano Sanfilippo
- 32,265
- 7
- 79
- 80