I'm trying to configure vimdiff as a git merge tool, so my global git config contains the following lines:

    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

  • IIRC, the layout functionality was only added in git version 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-mergetool on your machine and verify that the layout section is missing.
    – Ingo
    Commented Aug 12, 2022 at 18:03
  • Thank you very much for your answer, which seems to be the answer: man git-mergetool does not contain layout for my version of git, gonna update it!
    – gigoQ
    Commented Aug 12, 2022 at 18:14

1 Answer 1


This feature was added in git version 2.37. Quoting from the changelog:

  • "vimdiff[123]" mergetool drivers have been reimplemented with a more generic layout mechanism.

This means that in order to use the new layout mechanism, you need to upgrade your git installation to this (or a newer) version.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.