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