Home>Article>Operation and Maintenance> Linux command to exit edit mode

Linux command to exit edit mode

hzc
hzc Original
2020-06-12 13:57:43 14851browse

Linux command to exit edit mode

The commands for linux to exit editing mode are:

vim has three modes. Note: these three modes have many different names. I am following the name in Brother Niao’s Linux book.

General command mode, editing mode, command line command mode

1.vim file name Enter the general mode;

2. Press i to edit Enter the editing mode; (or I, o, O, a, A, r, R)

3. After editing, press the ESC key to jump to the normal mode;

4. Press: Enter the command line command mode;

The command after entering the command line mode is as follows

1. Save without exiting:

:w Save the file but do not exit vi editing

:w! Force save without exiting vi Edit

:w file Save the changes to file without exiting vi Edit

2. Save and exit:

:wq Save the file and Exit vi editing

:wq! Force save the file and exit vi editing

3. Do not save and exit:

:q Do not save the file and exit vi editing

: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

Recommended tutorial: "linux tutorial

The above is the detailed content of Linux command to exit edit mode. 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