Whenever there are some git merge conflicts we would type git mergetool
and git would automatically launch a merge tool for us to merge the conflicts. I have been using vimdiff for a long time as my mergetool, but found it actually not efficient at all as using three-way merging won't provide more information but would occupy the precious screen space.
So I am really interested in using pure vim (not in diff mode) as my git mergetool. But I can't configure it directly since git only accepts certain difftools as git mergetool(opendiff kdiff3 tkdiff xxdiff meld tortoisemerge gvimdiff diffuse diffmerge ecmerge p4merge araxis bc codecompare emerge vimdiff
).
So I am wondering if there is way that I can configure pure vim as my tool to solve conflicts? Note using vim to open and edit the conflicted files directly is not desired here since you would lose a lot of conveniences provided by calling git mergetool
, including automatic file opening and automatic git staging.
<<<<
,====
and>>>>
marks. I think those information is sufficient for us to solve the most conflicts, isn't it? Besides since we have a larger window by using the pure vim, we would have better understanding of the nearby context when solving the conflicts. – huangzonghao May 17 '18 at 19:14git help mergetool
– D. Ben Knoble♦ May 17 '18 at 19:22.orig
file. This really helps you to know the progress. – huangzonghao May 17 '18 at 19:26