mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
vimdiff: cleanup and update page (#4968)
This commit is contained in:
parent
cb83e50f55
commit
76c19c3dfd
1 changed files with 28 additions and 7 deletions
|
@ -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`
|
||||
|
|
Loading…
Add table
Reference in a new issue