Instead of typing :q for each open window, you can enter two commands:
- :only
- :q
or simply concatenate them at the command line for a one-liner:
- :on|q
Comments
What about a different one-liner? Three of them, actually, you can choose:
:qa!
to quit all without saving, or
:xa
to quit all and save anything 'modified', or
:qa
to quit all, except if there are 'modified' buffers?
See :help window-exit — Tonymec 23:22, August 14, 2010 (UTC)
Merge?
Nearly all the tips are written for a fairly advanced user. That has always struck me as a problem, particularly since many tips are poorly documented and require the reader to spend quite a long time working out what they are about (if you could quickly understand the tip, you probably would not need to read it). However, this proposed tip is rather too far in the other direction because it is an isolated fragment of information that would be hard to find by someone who needed it. Rather than putting this through our "new tips" procedure, I'm thinking that it might be best to quickly make a decision on this page. How about replacing this page with a redirect to Tutorial where I would make a new section like "Exiting Vim" with the information Tony outlined, with a tiny bit more? Please add any thoughts here. By the way, I will get back to fixing "new tips" when things have quietened down here. JohnBeckett 11:04, August 16, 2010 (UTC)