[Vim] Diff and merge using Vim

After performing a system update on my Linux machine, the package manager placed a copy of an updated configuration file on the system – it couldn’t overwrite them as I had previously modified it. Since I was also using SSH to remote in the Linux machine, I didn’t want to merge the changes using a GUI like Meld. Fortunately, Vim supports diffing and runs within the terminal!

To view the diff between files, you can use vimdiff.

vimdiff {first file} {second file}

Read more of this post