vimdiff: cleanup and update page (#4968)

translation-badges
hodapp512 2020-12-14 07:03:56 -06:00 committed by GitHub
parent cb83e50f55
commit 76c19c3dfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 28 additions and 7 deletions

View File

@ -1,16 +1,37 @@
# vimdiff
> Open up to four files in vim and show the differences between them.
> See `vim` documentation for working with files and navigating within a window.
> 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 (up to four files can be compared):
- Open two files and show the differences:
`vimdiff {{file1}} {{file2}}`
- Open two files using a horizontal window split instead of the default vertical split:
- Move the cursor to the window on the left|right:
`vimdiff -o {{file1}} {{file2}}`
`Ctrl + w {{h|l}}`
- Move the cursor to the window on the left|right|up|down:
- Jump to the next difference:
`Ctrl + w {{h|l|k|j}}`
`[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`