Back to Cheatsheets

Vimdiff

Vim2018-12-06

Getting started

{: .-three-column}

{: .-prime}

ShortcutDescription
]cNext difference
[cPrevious difference
{: .-shortcuts}

Editing

ShortcutDescription
doDiff Obtain!
Pull the changes to the current file.
dpDiff Put!
Push the changes to the other file.
------
:diffupdateRe-scan the files for differences.
ZQQuit without checking changes
{: .-shortcuts}

Folds

ShortcutDescription
zo / zOOpen
zc / zCClose
za / zAToggle
------
zvOpen folds for this line
------
zMClose all
zROpen all
------
zmFold more (foldlevel += 1)
zrFold less (foldlevel -= 1)
------
zxUpdate folds
{: .-shortcuts}

Also see