Situation: I've typed this:
vim foo.js
:terminal
Now I have one split, a file editing buffer and a terminal.
The good: I can quit by closing the terminal first, then the file buffer.
The bad: But if I close the file buffer, and then the terminal, vim doesn't exit, but instead creates a new buffer editing the file, which I've just closed.
I find this distracting and confusing. I don't want it to open up foo.js again.
If that doesn't seem like a bug/misfeature, consider this use-case:
- I open up foo.js
- :terminal
- close foo.js
- open up foo.js in another instance of vim
- in the original vim instance, close the :terminal
In this case when the original vim instance tries to open foo.js (instead of quitting) I get a large error screen about "Another program may be editing the same file."
How do I make vim quit when I close the last buffer, even if it's a :terminal?