:q!
and ZQ
both fail.
I had a file opened; I made a new tab with :tabnew
(just for some register swapping); I switched back to my main file and wrote my changes to a new filename; I tried ZQ
to no avail.
I then successfully closed the file (I don't recall how), leaving the extra [No name] tab open. I tried to quit again; no success. I get an error: No write since last change (add ! to override)
but I am using ! already.
This is on Ubuntu 14.04 in a virtualbox.
How can I get vim to exit???
I got it to close—no idea which step worked, so I'm leaving this question open for the "why" part.
Funny behavior on the no name tab—I deleted the contents and tried to exit; got the same error message and the contents I had deleted reappeared! Used u
to undo back to the oldest change (empty buffer) and tried to exit again; same error and content reappeared. Made a new tab and closed it with :q!
successfully, then tried ZQ
on original no-name-and-mysteriously-not-empty tab, and it somehow worked. :/