Diff file with vim
A small trick to diff 2 files with vim
Demo
- First open
file_a.txtin vim.

- Then open another file,
file_b.txtin split mode (:vsp file_b.txt).

-
Incase we need to diff
file_a.txtwithfile_b.txtthen press<Ctrl-W> + w(press control button + w then w). -
We are in
file_a.txt, run:diffthis. -
Go to
file_b.txtpress<Ctrl-W> + wand run:diffthis. -
Wala..magic right!, it’s show diff between 2 files.

- After that we can disable diff by run
:diffoffboth of file…done.
