Section: Ex command-line essentials

Write and quit

vim
vim
:w  :q  :wq  :q!
Explanation

These are the basic file lifecycle commands.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Ex command-line essentials
Insert shell output into buffer
Read command output below the cursor line.
OpenIn sheetvimsame section
Run a shell command
Execute a command without leaving the editor.
OpenIn sheetvimsame section
Open the command-line window
Edit command history in a full window.
OpenIn sheetvimsame section
Open a help topic
View docs for a keyword or command.
OpenIn sheetvim1 tag match
Save a session file
Store tabs, windows, and buffers.
OpenIn sheetvim1 tag match
Look up special key notation
Search for control-key topics and special commands.
OpenIn sheetvim1 tag match