Ravi Sir's Cards › AWS
:wq vs :q!
This comparison card contrasts :wq and :q! :wq is described as save and quit. :q! is described as quit without saving. The card pairs :wq with edit is good, and :q! with edit went wrong.
Read card text
What this card says
Changes
:wq
Save and quit.
:q!
Quit without saving.
Key points
Keeps your edits.
Drops your edits.
Example
:wq
Use when
Edit is good.
Edit went wrong.