Search code examples
gitvimversion-controlvim-plugingit-commit

How can I tell git which vim to use?


When I edit a commit message with vim (by entering git commit), vim opens, but first with a prompt that the YouCompleteMe plugin is unavailable:

$ git commit
YouCompleteMe unavailable: requires Vim 7.3.584+
Press ENTER or type command to continue

When I check the version using :version after pressing ENTER, I see that vim 7.3 is running. However, if I start vim directly from the command line (not using git commit), I see that I'mrunning vim 7.3.754. How can I tell git to use the newer version of vim?


Solution

  • Use

    git config --global core.editor /my/version/of/vim