사용자 도구

사이트 도구


vim:vimdiff

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
vim:vimdiff [2012/11/09 22:30]
kwon37xi 새로 만듦
vim:vimdiff [2021/02/17 23:51] (현재)
kwon37xi
줄 1: 줄 1:
 ====== vimdiff ====== ====== vimdiff ======
   * 두 파일의 다른점을 비교해가며 편집할 수 있다.   * 두 파일의 다른점을 비교해가며 편집할 수 있다.
-  * ''vimdiff file1 file2 ...' 혹은 ''vim -d file1 file2...'' 명령으로 실행+  * ''vimdiff file1 file2 ...'' 혹은 ''vim -d file1 file2...'' 명령으로 실행
   * [[http://www.debianadmin.com/vimdiff-edit-two-or-three-versions-of-a-file-with-vim-and-show-differences.html|vimdiff – Edit two or Three versions of a file with Vim and show differences]]   * [[http://www.debianadmin.com/vimdiff-edit-two-or-three-versions-of-a-file-with-vim-and-show-differences.html|vimdiff – Edit two or Three versions of a file with Vim and show differences]]
   * [[http://technotales.wordpress.com/2009/05/17/git-diff-with-vimdiff/|Git Diff with Vimdiff]]   * [[http://technotales.wordpress.com/2009/05/17/git-diff-with-vimdiff/|Git Diff with Vimdiff]]
 +  * [[https://goodtogreate.tistory.com/entry/git-difftool-%EC%82%AC%EC%9A%A9%EB%B2%95|git difftool 사용법 vimdiff]]
 +  * [[https://www.rosipov.com/blog/use-vimdiff-as-git-mergetool/|Use vimdiff as git mergetool - Ruslan Osipov]]
 +  * [[https://gist.github.com/mattratleph/4026987|vimdiff cheat sheet]]
 +  * [[https://medium.com/usevim/git-and-vimdiff-a762d72ced86|Git and Vimdiff | by Alex R. Young | usevim | Medium]]
 +
 +===== 사용법 =====
 +  * ''do'' - Get changes from other window into the current window.
 +  * ''dp'' - Put the changes from current window into the other window.
 +  * '']c'' - Jump to the next change.
 +  * ''[c'' - Jump to the previous change.
 +  * ''zo'' - open folded text
 +  * ''zc'' - close folded text
 +  * ''Ctrl W + Ctrl W'' - Switch to the other split window.
 +  * If you load up two files in splits (:vs or :sp), you can do '':diffthis'' on each window and achieve a diff of files that were already loaded in buffers
 +  * '':diffoff'' can be used to turn off the diff mode. 
 +
 +===== 설정 =====
 +  * ''Ctrl+Alt+Down'' 으로 다음 차이로 이동
 +  * ''Ctrl+Alt+Up'' 으로 이전 차이로 이동
 +<code>
 +nnoremap <expr> <silent> <C-A-Down>   (&diff ? "]c" : ":cnext\<CR>")
 +nnoremap <expr> <silent> <C-A-Up> (&diff ? "[c" : ":cprev\<CR>")
 +</code>
 +  * 공백 비교 피하기
 +<code>
 +:set diffopt+=iwhite
 +</code>
 +
vim/vimdiff.txt · 마지막으로 수정됨: 2021/02/17 23:51 저자 kwon37xi