You can use any of these Vim Ex commands to Exit Multiple Windows And Buffers:
:qa:qall
Exit Vim, unless there are some buffers which have been changed. (Use :bmod to go to the next modified buffer). When 'autowriteall' is set all changed buffers will be written, like :wqall.
:conf qa:confirm qall
Exit Vim. Bring up a prompt when some buffers have been
changed. See :confirm.
:qa!:qall!
Exit Vim. Any changes to buffers are lost. Also see :cquit, it does the same but exits with a non-zero value.
:quita:quitall:quita!:quitall!
Same as :qall.
:wqa:wqall:xa:xall
Write all changed buffers and exit Vim. If there are buffers
without a file name, which are readonly or which cannot be
written for another reason, Vim will not quit.
:conf wqa:confirm wqall:conf xa:confirm xall
Write all changed buffers and exit Vim. Bring up a prompt
when some buffers are readonly or cannot be written for
another reason. See :confirm.
:wqa!:xa!:wqall!:xall!
Write all changed buffers, even the ones that are readonly,
and exit Vim. If there are buffers without a file name or
which cannot be written for another reason, Vim will not quit.
To read about these in Vim, type the following Ex command
Shortest/simplest/fastest way would be:
To save work in all tabs and quit:
You can use any of these Vim Ex commands to Exit Multiple Windows And Buffers:
:qa
:qall
Exit Vim, unless there are some buffers which have been changed. (Use
:bmod
to go to the next modified buffer). When 'autowriteall' is set all changed buffers will be written, like:wqall
.:conf qa
:confirm qall
Exit Vim. Bring up a prompt when some buffers have been changed. See
:confirm
.:qa!
:qall!
Exit Vim. Any changes to buffers are lost. Also see
:cquit
, it does the same but exits with a non-zero value.:quita
:quitall
:quita!
:quitall!
Same as
:qall
.:wqa
:wqall
:xa
:xall
Write all changed buffers and exit Vim. If there are buffers without a file name, which are readonly or which cannot be written for another reason, Vim will not quit.
:conf wqa
:confirm wqall
:conf xa
:confirm xall
Write all changed buffers and exit Vim. Bring up a prompt when some buffers are readonly or cannot be written for another reason. See
:confirm
.:wqa!
:xa!
:wqall!
:xall!
Write all changed buffers, even the ones that are readonly, and exit Vim. If there are buffers without a file name or which cannot be written for another reason, Vim will not quit.
To read about these in Vim, type the following Ex command
This closes all tabs and open buffers.
I often use :tabo to close all other tabs.
That can be done with the following command (in normal or escape mode):
"tabdo" apparently executes the command for all the open tabs.
Adding to what fuentesjr said:
Will force quit all tabs, if you don't care about saving.