为什么 VimDiff 如此有限?

发布于 2024-10-08 23:47:58 字数 125 浏览 2 评论 0原文

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

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

With all the advanced editing capabilities of Vim, I find it hard to believe that VimDiff doesn't have a way of copying from/to right/left!! What else can a difftool be used for? Any idea? What are the capabilities of VimDiff?

Also, I don't even see a way of moving to the next/prev difference!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

意犹 2024-10-15 23:47:58

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

:h diff

< code>:h :h 也是你的朋友。

Every thing is explained in the help ... (do, dp, ]c, [c)

:h diff

:h :h is also your friend.

如痴如狂 2024-10-15 23:47:58

您需要使用 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 .

You need to use do and dp for your copying needs; these represent 'put' from current window, and 'obtain' from the other window. (This assumes a dual-split diff.)

For moving to next/prev difference, use ]c and [c .

Here are the basic commands I use, with mnemonics where possible:

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 .
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文