1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 00:42:08 +02:00
tldr/pages/common/vimdiff.md
2020-12-14 10:03:56 -03:00

639 B

vimdiff

Open up two or more files in vim and show the differences between them. See also vim. More information: https://www.vim.org.

  • Open two files and show the differences:

vimdiff {{file1}} {{file2}}

  • Move the cursor to the window on the left|right:

Ctrl + w {{h|l}}

  • Jump to the next difference:

[c

  • Jump to the previous difference:

]c

  • Copy the highlighted difference from the other window to the current window:

do

  • Copy the highlighted difference from the current window to the other window:

dp

  • Update all highlights and folds:

:diffupdate

  • Toggle the highlighted code fold:

za