How To Diff Two Files In Vim

Author: , February 5th, 2024

shell> vim file1 file2 Create a vertical split window: Control-w v Enable visual diff on the left side: :diffthis Move the cursor to the right side buffer: Control-w Right-arrow Enable visual diff on the left side: :diffthis You should now see the differences highlighted on both sides.