On running:
vim /tmp/blah
:q
echo $?
I get an exit status of 1. This is breaking various things including Git. If I run vim without my vimrc:
vim -u NONE /tmp/blah
:q
echo $?
I get an exit status of 0. I use Pathogen so this also effectively disables plugins. Does anyone have a suggestion for efficiently determining the cause of the exit status? I’m aware of running Vim verbosely and logging to a file. Should I be looking for something specific in this file?
If there is a method of finding the exact line that determines the exit status I would love to know of it as searching around didn’t turn much up.
Finally found this command in help:
:cq[uit]. So after you do verbose logging, search for\<cq\%[uit]\>.Update: There are also methods to alter the exit status using vim compiled with some interpreters support: at least, the following works:
I do not know other languages enough to write here examples of code that would quit vim with different exit status. Note also that such commands inside files sourced using
:pyfile,:rubyfileand other:*fileshould also work, as well as this code in a modules not distributed with plugin.I think the most efficient way here at this point is disabling plugins until you find the source of the problem.