Home  >  Article  >  Operation and Maintenance  >  What is the save and exit command in vim

What is the save and exit command in vim

王林
王林Original
2020-10-19 14:31:31128878browse

The save and exit command in vim is wq. Specific method: first press i key to enter insert mode; then edit the file; then press esc key to enter command line mode; finally enter [:wq] to save the file and exit.

What is the save and exit command in vim

#The operating environment of this article: linux5.9.8 system, Dell G3 computer.

Enter the linux system, enter the following command to create a new file named hello_vim

What is the save and exit command in vim

Enter the insert mode (press the i key to enter), and enter a line of content.

What is the save and exit command in vim

Enter command mode, enter w, and press Enter to execute to save the currently edited content.

What is the save and exit command in vim

Follow the above steps, after executing the w (save) command, execute the q (exit) command to exit the VIM editor.

Open the file with vim. After editing in the file, enter the command mode and directly execute the wq command to save the file and exit the VIM editor.

Related recommendations: linux tutorial

The above is the detailed content of What is the save and exit command 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