Save all changed buffers and quit Vim
Example
Normal 0 / 2Command-line 1 / 2Exited 2 / 2changed gamma
gamma two
gamma threeCursor on line 3, column 1changed gamma
gamma two
gamma threeCursor on line 3, column 1Vim is closed
Save all changed buffers and quit Vim.
Windows
- Window 3 · gamma.txt Active
40 columns × 11 lines- Window 1 · alpha.txt
39 columns × 22 lines
- Window 2 · beta.txt
40 columns × 10 lines
Buffers
- 2 · alpha.txt
loaded · listed · modified · changed alpha ↩ alpha two- 3 · beta.txt
loaded · listed · modified · alternate · changed beta ↩ beta two- 4 · gamma.txt Active
loaded · listed · modified · changed gamma ↩ gamma two
Example files
- alpha.txt
alpha one ↩ alpha two ↩ alpha three- beta.txt
beta one ↩ beta two ↩ beta three- delta.txt
delta one ↩ delta two- gamma.txt
gamma one ↩ gamma two ↩ gamma three
Command entered · ready to apply
Windows
- Window 3 · gamma.txt Active
40 columns × 11 lines- Window 1 · alpha.txt
39 columns × 22 lines
- Window 2 · beta.txt
40 columns × 10 lines
Buffers
- 2 · alpha.txt
loaded · listed · modified · changed alpha ↩ alpha two- 3 · beta.txt
loaded · listed · modified · alternate · changed beta ↩ beta two- 4 · gamma.txt Active
loaded · listed · modified · changed gamma ↩ gamma two
Example files
- alpha.txt
alpha one ↩ alpha two ↩ alpha three- beta.txt
beta one ↩ beta two ↩ beta three- delta.txt
delta one ↩ delta two- gamma.txt
gamma one ↩ gamma two ↩ gamma three
Vim exited
Example files
- alpha.txt
changed alpha ↩ alpha two ↩ alpha three- beta.txt
changed beta ↩ beta two ↩ beta three- delta.txt
delta one ↩ delta two- gamma.txt
changed gamma ↩ gamma two ↩ gamma three
Before & after
changed gamma
gamma two
gamma threeCursor on line 3, column 1Windows
- Window 3 · gamma.txt Active
40 columns × 11 lines- Window 1 · alpha.txt
39 columns × 22 lines
- Window 2 · beta.txt
40 columns × 10 lines
Buffers
- 2 · alpha.txt
loaded · listed · modified · changed alpha ↩ alpha two- 3 · beta.txt
loaded · listed · modified · alternate · changed beta ↩ beta two- 4 · gamma.txt Active
loaded · listed · modified · changed gamma ↩ gamma two
Example files
- alpha.txt
alpha one ↩ alpha two ↩ alpha three- beta.txt
beta one ↩ beta two ↩ beta three- delta.txt
delta one ↩ delta two- gamma.txt
gamma one ↩ gamma two ↩ gamma three
Vim is closed
Example files
- alpha.txt
changed alpha ↩ alpha two ↩ alpha three- beta.txt
changed beta ↩ beta two ↩ beta three- delta.txt
delta one ↩ delta two- gamma.txt
changed gamma ↩ gamma two ↩ gamma three
Start in Normal mode. This command actually exits the isolated Vim process. Closed editor state is confirmed by VimLeavePre and successful process termination; saved content is read from temporary example files after exit.
Details & Vim help
Example replayed in Vim
Save all changed buffers and quit Vim. This Ex reference uses the full command name; the alphabetical index omits arguments. Supply the ranges, arguments, flags and prerequisite state documented in the linked help. Press Enter to submit a complete command. The index spelling :wqa[ll] puts the optional abbreviation suffix in square brackets; those brackets are not typed. Availability and exact behavior can depend on Vim build features, options, mappings and editor state; the linked help is authoritative.