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
hzc Original
2020-07-04 14:28:38 24134browse

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 usingviminLinux, entervim xxx.fileEnter OK How to save the file content?

PressESC, you can enter in the lower left corner

:wSave but do not exit

:wqSave and exit

:qExit

: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