A very nice alternative to plain diff.
vimdiff file1 file2
This is really awesome. Using regular “diff –side-by-side” is ok, but you can’t make changes when you have the two files next to each other. With vimdiff you can!
Use Ctrl-W then L or H to move back and forth. YY and P to copy and paste.




In vimdiff mode, you can also use the diffput and diffget commands to push and pull differences between buffers. These commands support a range prefix and target buffer parameter, but I don’t think I’ve ever done anything other than position my cursor at the difference I want to merge and execute a :diff[put|get].