VIM editor is a popular editor and one of the basic operations is How to close and exit the vim editor.
It is one of the basic and required steps to quit the vim editor.
This article explains multiple ways to close the editor.
How do I exit the Vim editor?
There are multiple ways to exit the Vim editor.
Here are the steps to close the editor.
- First, Go to
Normalmode by pressing the ESC key
- Change to
Commandmode by typing a colon (
:appears bottom of the editor.
- type one of the commands from one of the below command lists.
- For example type
:quitto exit from the Vim editor
Following is a command list with different options to close the Vim editor
|exit the current window by saving current changes, if one window exists, exit the editor
|exit without saving current changes
|Save the current file and exit, if the file has readonly permissions, failed
|Save the current file and exit, even for readonly permissions of a file
|save only for modifications and exit
|exit all windows