Original article: http://hi.baidu.com/flost_li/blog/item/acbccd2355952d47935807d0.html
Usage:
1: Use vim-D file1 file2 to directly open two files for comparison
Or: Use Vim file1 to open the first file, and then use vert diffsplit file2 to open the second file for comparison;
(VERT indicates the Vertical Split Window, which is a horizontal split window by default)
2: directly compare the differences between the two files: Input in two windows using diffthis;
3: Other tips:
3.1: identify differences: [C,] C jump to the previous and later differences respectively;
3.2: Window jump: Ctrl-w jump to the next window
CTRL-w h/l jump to the left (right) window
CTRL-w j/K jump to the upper (lower) window
3.3: Document merging: DP combines the current document content of the difference points into another document (diff put)
Do copies the content of another document from the difference to the current document.
3.4: open the file fold: (by default, some content is collapsed to expand the field of view)
Zo temporarily expands the same collapsed content
ZC re-fold
# End