Skip to content
Ricky
English

Search

Searching… No matching pages. Matching pages are listed below. Search is unavailable. Please try again.

Using Vim as a Diff Tool

  • Ricky Lin
  • 1 minute
On this page

command

vim -d file1.txt file2.txt or vimdiff file1.txt file2.txt

  • Switching Between Diff Windows: Ctrl-w + Ctrl-w
  • Changing Split Window Orientation
    • ctrl-w + K key combination to change window orientation from vertical to horizontal.
    • ctrl-w + H shortcut to switch back window orientation to a vertical split.
  • Jumping Between Changes
    • ]c key combination to go to the next change.
    • [c shortcut to jump to the previous change.
  • Applying Changes From the Diff Window: :diffget, :diffput
  • Export Diff to the HTML Web Page: :TOhtml | w ~/diff.html