프로그램 사용/vi2016. 11. 17. 19:14


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]

'프로그램 사용 > vi' 카테고리의 다른 글

vi 단어 단위 이동  (0) 2017.02.01
vi syntax highlight 선택하기  (0) 2017.01.03
vimdiff 사용법  (0) 2016.11.17
vi 스크롤  (0) 2016.11.10
vi ctrl-s / ctrl-q  (0) 2016.11.09
vim 버전별 옵션 차이  (0) 2016.11.08
Posted by 구차니

댓글을 달아 주세요