比较文件时,我喜欢使用vimdiff
(或vim -d
),并且我知道使用 vimdiff 复制更改的推荐方法是:
]c - advance to the next block with differences
[c - reverse search for the previous block with differences
do (diff obtain) - bring changes from the other file to the current file
dp (diff put) - send changes from the current file to the other file
我也知道
:diffget
是相同的do
:diffput
是相同的dp
所有这些命令都可以正常工作(包括:diffput
),但是当我输入 时dp
,没有任何变化并且会产生错误声音。
我认为这是因为与 vim-fugitive 的热键映射冲突,它有一个热键dp
:
dp :Git! diff (p for patch; use :Gw to apply)
dp :Git add --intent-to-add (untracked files)
如何解决这个问题?谢谢你。