How to save and exit Vim editor
Learn, how to save your changes and exit the vim editor.
Saving and exit
To save the changes and exit the vim, press the Esc
key then type :wq
command.
Where w
means write to the file and q
is quit.
Exit without saving
To exit the vim without saving the changes, press the Esc
key then type :q!
command.
Saving the file
To save the file without exiting the vim, press the Esc
key then type :w
command.