Vim Tips Wiki
Advertisement

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
Advertisement