Quit Vim
Example
Normal 0 / 2Command-line 1 / 2Exited 2 / 2gamma one
gamma two
gamma threeCursor on line 3, column 1gamma one
gamma two
gamma threeCursor on line 3, column 1Vim is closed
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 · alpha one ↩ alpha two- 3 · beta.txt
loaded · listed · alternate · beta one ↩ beta two- 4 · gamma.txt Active
loaded · listed · gamma one ↩ 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 · alpha one ↩ alpha two- 3 · beta.txt
loaded · listed · alternate · beta one ↩ beta two- 4 · gamma.txt Active
loaded · listed · gamma one ↩ 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
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
Before & after
gamma one
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 · alpha one ↩ alpha two- 3 · beta.txt
loaded · listed · alternate · beta one ↩ beta two- 4 · gamma.txt Active
loaded · listed · gamma one ↩ 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
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
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
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 :qa[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. Exit checks cover modified buffers across windows and tab pages, including hidden buffers. Without !, Vim stays open if a modified buffer cannot be abandoned. 'autowriteall' can save changed buffers. Use :confirm qall to prompt about changes. With !, Vim quits and discards unsaved changes.