Home >Operation and Maintenance >Linux Operation and Maintenance >How to exit linux vim without saving

How to exit linux vim without saving

angryTom
angryTomOriginal
2019-11-05 14:17:5943421browse

How to exit linux vim without saving

How to exit linux vim without saving

To exit vim without saving, you can first press ESC to enter the command mode; then enter: Enter the bottom line of the command mode; finally enter q and press Enter.

More Vim commands

Enter editing mode, press o to edit

After editing, press ESC key to jump to command mode, then enter to exit Command:

:w Save the file but do not exit vi Edit

:w! Force save without exiting vi Edit

:w file Save the changes to file without exiting vi Exit vi edit

:wqSave the file and exit vi edit

:wq!Force save the file and exit vi edit

q:Do not save the file and exit vi edit

:q!Do not save the file and force quit vi editing

:e!Discard all changes and start editing from the last time you saved the file

Recommendation:Linux usage tutorial

The above is the detailed content of How to exit linux vim without saving. 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