Vim Error for Git Commit Message

2018-06-05 22:07:19

When using vim as my default editor, I (occasionally) accidentally pull up search (e.g. via /wq instead of :wq). Once I do, I escape out of search, and then exit correctly via :wq. However, when that happens, I see the following error message:

hint: Waiting for your editor to close the file... error: There was a problem with the editor 'vi'.

Please supply the message using either -m or -F option.

I'm trying to understand why vi is not exiting correctly, or how I can fix it to exit correctly even after a failed search.

I am using macOS High Sierra.

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Nov 29 2017 18:37:46)

Included patches: 1-503, 505-680, 682-1283

Steps to reproduce:

> git commit

vim> i

vim> My Commit Message

vim>

vim> /wq

vim>

vim> :wq

Thanks for the help.