문제

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 .
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top