====== vimdiff ======
* 두 파일의 다른점을 비교해가며 편집할 수 있다.
* ''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://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'' 으로 이전 차이로 이동
nnoremap (&diff ? "]c" : ":cnext\")
nnoremap (&diff ? "[c" : ":cprev\")
* 공백 비교 피하기
:set diffopt+=iwhite