开发者

Why is VimDiff so limited? [closed]

开发者 https://www.devze.com 2023-01-31 23:12 出处:网络
As it cu开发者_运维技巧rrently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely so
As it cu开发者_运维技巧rrently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

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!!


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

:h diff

:h :h is also your friend.


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 .
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号