Last Updated: February 25, 2016
·
5.436K
· shinn

error: There was a problem with the editor 'vi'.

I actually get this error quite often when I was using vim for git commit. Whenever finish typing the commit message and :wq, any typo will kill the commit message and returns this error error: There was a problem with the editor 'vi'. which is really frustrating.

Fortunately, here's the solution:

git config --global core.editor $(which vim)

Edited:
Try the following if you get this: error: There was a problem with the editor '/usr/local/bin/vim'.

git config --global core.editor /usr/bin/vim