Home  >  Article  >  Operation and Maintenance  >  What is the command to exit without saving in vim?

What is the command to exit without saving in vim?

hzc
hzcOriginal
2020-07-04 14:28:3824147browse

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.

What is the command to exit without saving in vim?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn