3. Jumping to diffs *jumpto-diffs* Two commands can be used to jump to diffs: *[c* [c Jump backwards to the previous start of a change. When a count is used, do it that many times. *]c* ]c Jump forwards to the next start of a change. When a count is used, do it that many times. It is an error if there is no change for the cursor to move to. |
4. Diff copying *copy-diffs* *E99* *E100* *E101* *E102* *E103* *merge* There are two commands to copy text from one buffer to another. The result is that the buffers will be equal within the specified range. *:diffg* *:diffget* :[range]diffg[et] [bufspec] Modify the current buffer to undo difference with another buffer. If [bufspec] is given, that buffer is used. If [bufspec] refers to the current buffer then nothing happens. Otherwise this only works if there is one other buffer in diff mode. See below for [range]. *:diffpu* *:diffput* *E793* :[range]diffpu[t] [bufspec] Modify another buffer to undo difference with the current buffer. Just like ":diffget" but the other buffer is modified instead of the current one. When [bufspec] is omitted and there is more than one other buffer in diff mode where 'modifiable' is set this fails. See below for [range]. *do* do Same as ":diffget" without argument or range. The "o" stands for "obtain" ("dg" can't be used, it could be the start of "dgg"!). Note: this doesn't work in Visual mode. dp Same as ":diffput" without argument or range. Note: this doesn't work in Visual mode. |
zo / z+space 펼치기
zc / 접기
[링크 : http://seungigi.blogspot.com/2012/02/vimdiff.html]
+
2022.09.21
]c 앞쪽으로 이동하며 차이점 부분 찾기
[c 뒤쪽으로 이동하며 차이점 부분 찾기
do 커서가 있는 쪽의 내용을 반대쪽에 복사한다
dp 커서가 없는 쪽의 내용을 커서가 있는 쪽에 복사한다.
zo 숨긴부분 열기
zc 차이점 없는 부분 열기
:diffupdate 차이점 비교 update시 실행
'프로그램 사용 > vi' 카테고리의 다른 글
vi 단어 단위 이동 (0) | 2017.02.01 |
---|---|
vi syntax highlight 선택하기 (0) | 2017.01.03 |
vi 스크롤 (0) | 2016.11.10 |
vi ctrl-s / ctrl-q (0) | 2016.11.09 |
vim 버전별 옵션 차이 (0) | 2016.11.08 |