How can I expand/collapse a diff sections in Vimdiff?

I’ve started using vimdiff today, and wanted to do some of the things that I’ve taken for granted on Windows based diff editors (like expand/collapse a diff section, have full file expansion/only diffs with three context lines above or below, etc.). I currently know only the following commands:

Keyboard Shortcuts:

  • do – Get changes from other window into the current window.

  • dp – Put the changes from current window into the other window.

  • ]c – Jump to the next change.

  • [c – Jump to the previous change.

  • Ctrl+W, w – Switch to the other split window (Ctrl + W, Ctrl + W does the same thing, in case you let go of the Ctrl key a bit later)

Could someone point me to the right direction so I could replicate similar features?

It would be nice if I could expand/collapse lines around the diffs, for example.

4 Answers
4

Leave a Comment