diff shows what differs. vimdiff shows it and lets you fix it right there, which I think is great for merging two versions of a config file.
vimdiff nginx.conf nginx.conf.new
Vim opens both files in vertical splits, scrolls them together, folds away the parts that are the same and highlights the lines that differ. vim -d does the same thing.
Move between differences with ]c and [c. On a difference, two commands copy text across:
dp
do
dp is diff put: it pushes the version under your cursor to the other file. do is diff obtain: it pulls the other file’s version into this one. Switch between the two windows with Ctrl-w w.
Then save what changed, or use :wqa to write and close both.
After lots of manual editing, the highlighting can get out of step with the text. :diffupdate recalculates it. And if whitespace differences drown out the real ones, :set diffopt+=iwhite makes Vim ignore changes in the amount of white space.
Further reading: Vim help: vimdiff, Vim help: dp and do
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more