Skip to main content

Open up two or more files in vim and show the differences between them.

# To open two files and show the differences:
vimdiff <file1> <file2>

# To move the cursor to the window on the left|right:
Ctrl + w <h|l>

# To jump to the next difference:
[c

# To jump to the previous difference:
]c

# To copy the highlighted difference from the other window to the current window:
do

# To copy the highlighted difference from the current window to the other window:
dp

# To update all highlights and folds:
:diffupdate

# To toggle the highlighted code fold:
za