What is the difference between :q and :qa! in Vim?

Viewed 43620

I'm quite new to Vim so I first checked the help.txt file to inform myself about Vim. Here I saw the following:

Close this window: Use ":q".
Get out of Vim: Use ":qa!" (careful, all changes are lost!).

The first one closes Vim. The second one also. Wouldn't all changes also go with :q? To be clear, I use the vim GUI not a command prompt.

edit: It's more about the difference, not the actual meaning. The almost same explanation in the help.txt file confused me.

3 Answers

I don't see any of the answers specifically addressing the meaning of 'a' so thought I'd contribute:

:q is quit, as you know, but warns you didn't save

:qa is quit, all buffers, without saving but you'll get that same warning

:qa! is quit all buffers, without saving, and without a warning

Related