0

凭借 Vim 的所有高级编辑功能,我很难相信 VimDiff 没有从/向右/向左复制的方法!difftool 还能用来做什么?任何想法?VimDiff 的功能是什么?

另外,我什至看不到转移到下一个/上一个差异的方法!

4

2 回答 2

23

每件事都在帮助中解释... ( do, dp, ]c, [c)

:h diff

:h :h也是你的朋友。

于 2010-12-25T10:29:11.100 回答
9

您需要使用dodp满足您的复制需求;这些代表从当前窗口“放置”,从另一个窗口“获取”。(这假设一个双分裂差异。)

要移动到下一个/上一个差异,请使用]c[c

以下是我使用的基本命令,尽可能使用助记符:

dp - 'put' the changes from the current window into the other window.
do - 'obtain' the changes from other window.
]c - Go to change after (ending/next bracket) -- move to the next difference.
[c - Go to change before(opening/previous bracket) -- move to the previous diff.
zo - 'open' a section of folded text.
zc - 'close' a foldable text section.
Ctrl-W+Ctrl W - (That's ^W twice.) Jump to the other window.
:diffupdate - updates diff based on changes .
于 2012-06-29T14:58:32.143 回答