I will explain how to resolve code merge conflicts with plain vim. The only third party plugin required is vim-unimpaired.

The reason to use vim is that I can't use vimdiff as a merge tool for certain VCS (CVS, Subversion, Perforce, …).

Problem A typical file in conflict is like: hello world hello world <<<<<<< .mine This is fun stuff! ======= This is a documentation file >>>>>>> .r6 bye world bye world Let's call lines like ">>>>>>>", "<<<<<<<" and " ===== " conflict markers. Resolving conflicts is the operation of picking up either or both of the sections between markers.

Basic knowledge of Vim "]n" move the focus to the next marker and "[n" to the previous marker.

"dd" delete current line

"d]n" delete from current line to the next marker (next marker exclusive)