tags:

views:

1393

answers:

6

If I have 10 tabs opened, I have to close each one using ":q" separately. How can I close them all at once?

+2  A: 
:qall

This closes all tabs and open buffers.

Vagmi Mudumbai
+1  A: 

That can be done with the following command (in normal or escape mode):

:tabdo :q

"tabdo" apparently executes the command for all the open tabs.

Simucal
Note, this isn't my answer. I moved this out of the original non-question down to here.
Simucal
+14  A: 

Shortest/simplest/fastest way would be:

:qa

To save work in all tabs and quit:

:wqa
fuentesjr
+1  A: 

Adding to what fuentesjr said:

:qa!

Will force quit all tabs, if you don't care about saving.

Daniel Nadasi
+8  A: 

I often use :tabo to close all other tabs.

CMS
“close all other tabs” is much faster achieved by “:on” (for “only”, i.e. “the only window to show”). :)
Bombe
@CMS: This is a nice one!@Bombe: ":on" didn't work for me.
artknish
@Bombe: for me it didn't work, too. `:on` only closes *windows*, not tabs, at least in my vim 7.3.3.
Boldewyn
A: 

reset button on your pc ;)

test
Or the Vim command `:!killall -9 vim`. Doesn't have the nasty side-effects.
Boldewyn