Vimdiff

Enjoy this cheat sheet at its fullest within Dash, the macOS documentation browser.

Navigating

]c

Next difference

[c

Previous difference

Splits

CTRL-W=

Make splits equal size

CTRL-W CTRL-W

Cycle to the next split

Editing

do

Diff obtain

Pull the changes to the current file.

dp

Diff put

Push the changes to the other file.

:diffupdate

diffupdate

Re-scan the files for differences.

ZQ

Quit

Quit without checking changes.

Folds

zo/zO

Open

zc/zC

Close

za/zA

Toggle

zv

Open folds for this line

zM

Close all

zR

Open all

zm

Fold more (foldlevel += 1)

zr

Fold less (foldlevel -= 1)

zx

Update folds