Home > Article > Operation and Maintenance > What is the save and exit command in vim
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.
#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
Enter the insert mode (press the i key to enter), and enter a line of content.
Enter command mode, enter w, and press Enter to execute to save the currently edited content.
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!