I'm trying to configure vimdiff as a git merge tool, so my global git config contains the following lines:
[merge] tool = vimdiff conflictstyle = diff3 prompt = true [mergetool "vimdiff"] layout = "LOCAL,MERGED,REMOTE"
I want to get a specific layout, and not the default one, so I define the
layout variable as indicated here: https://git-scm.com/docs/git-mergetool#_vimdiff. However, when running
git mergetool, vimdiff totally ignores these settings and fires its default 4-window layout.
What is wrong with that config? How could I setup a non-default layout in this case?
git version 2.25.1, vim version 9.0
2.37(this is also indicated by switching to the previous version of the online manpage in the link you provided). Thus it's probably not available in your version. An easy check would be to run
man git-mergetoolon your machine and verify that the
layoutsection is missing.
man git-mergetooldoes not contain
layoutfor my version of git, gonna update it!