How To Diff Two Files In Vim
erics, Posted February 5th, 2024 at 4:10:35pm
shell> vimdiff file1 file2
~OR~
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.
Leave Your Comment
All fields marked with "*" are required.