Join our mailing list Subscribe Us

Vimdiff Tutorial: shortcut

I recently started using exclusively Vim (and gVim) for my coding needs. Vimdiff is a tool that comes bundled with Vim and its a wonderful tool for comparing code and merging changes. If you'd prefer to use a non-Vim based diff tool.



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 + Ctrl W - Switch to the other split window.


  • If you load up two files in splits (:vs or :sp), you can do :diffthis on each window and achieve a diff of files that were already loaded in buffers
  • :diffoff can be used to turn off the diff mode.