Merging with vimdiff

Thu, 2008-09-11
Open the files with vimdiff:
$ vimdiff file1 file2

To jump to the next difference:

To jump to the previous difference:

If there are only two files you can copy differences with:

If you are doing a diff with vim between more than two files you also have to specify from which buffer to :diffget or from which buffer to :diffput
:diffget b#
where b# is the buffer number. In vertical window split, buffers are numbered from left to right starting at 1.