Site icon LinuxCommands.site

vim tutorial: vim save and quit

Vim save and quit / exit, there are two shortcut keys:

  1. Open the terminal

2. Use vim to open the file and enter the vim normal mode

3. In the vim normal mode, use the i or a or o shortcut key to enter vim insert mode, add or modify content

4. After modification, press esc to exit vim insert mode

5. Type: enter the last line mode, then type x or wq and press Enter, vim will save and quit

6. Use the cat command to view the contents of the file

Exit mobile version