Using Vim as a Diff Tool
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 + Kkey combination to change window orientation from vertical to horizontal.ctrl-w + Hshortcut to switch back window orientation to a vertical split.
- Jumping Between Changes
]ckey combination to go to the next change.[cshortcut 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
