Home > Article > Operation and Maintenance > What is the command to exit without saving in vim?
The command to exit without saving in vim is [:q!], which means forced exit without saving, [:w] means saving but not exiting, [:wq] means saving and exiting, [.q] 】 is to exit.
When using vim
in Linux
, enter vim xxx.file
Enter OK How to save the file content?
Press ESC
, you can enter in the lower left corner
:w
Save but do not exit
:wq
Save and exit
:q
Exit
:q!
Force exit without saving
:e!
Discard all modifications and edit the command history starting from the last time you saved the file
Recommended tutorial: "linux tutorial"
The above is the detailed content of What is the command to exit without saving in vim?. For more information, please follow other related articles on the PHP Chinese website!