Files
tldr/pages.zh/common/vimdiff.md

37 lines
621 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# vimdiff
> 在vim中打开两个或更多文件并显示它们之间的差异。
> 另见: `vim`, `vimtutor`, `nvim`。
> 更多信息: <https://www.vim.org>。
- 打开两个文件并显示差异:
`vimdiff {{path/to/file1}} {{path/to/file2}}`
- 将光标移动到左侧|右侧窗口:
`<Ctrl> + w {{h|l}}`
- 跳转到上一个差异:
`[c`
- 跳转到下一个差异:
`]c`
- 将高亮的差异从另一个窗口复制到当前窗口:
`do`
- 将高亮的差异从当前窗口复制到另一个窗口:
`dp`
- 更新所有高亮和折叠:
`:diffupdate`
- 切换高亮代码的折叠:
`za`