What is the command to exit vim without saving?

烟雨青岚
Release: 2020-07-06 09:31:46
Original
17871 people have browsed it

The command to exit vim without saving is: ":q". There are other commands in vim, for example: if you do not save the file, the command to force exit is ":q!"; to save the file, the command to exit is ":wq"; to force save the file, the command to exit is ":wq!" .

What is the command to exit vim without saving?

The command to exit vim without saving is ":q"

Press the ESC key to jump to the command mode, and then Input:

:w - Save the file without exiting vim

:w file - Save the modifications to file without exiting vim

:w! - Force saving , do not exit vim

:wq -Save the file, exit vim

:wq! -Force to save the file, exit vim

:q -Do not save the file, exit vim

:q! -Do not save the file, force quit vim

:e! -Abandon all changes, start editing from the last time you saved the file

Recommended tutorial: "linuxtutorial

The above is the detailed content of What is the command to exit vim without saving?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template