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> <Esc>
vim> /wq
vim> <Esc>
vim> :wq
Thanks for the help.
/wq, what happens if you press:wqwithout the second ESC? – Sundar R Jun 06 '18 at 20:38viinstead of vim – kawerewagaba May 23 '19 at 20:26