I'm reiterating the question from this question on purpose. I don't have the reputation to write a comment, sorry!
I found a keyboard shortcut for killing all Terminal windows and it prompts me to confirm that I want to close if Vim or some other program is open! Unfortunately, I don't know which keys I press; it happened accidentally.
I'm running Ubuntu 16.04.
This question has been asked in one form or another before, including here. What is the actual keyboard shortcut?