How to save and exit vim under Linux

  1. vim filename enters the file
  2. Press == ctrl + i == or the insert key in the upper right corner of the keyboard to enter insert mode and modify the file content.
  3. After modifying the file, press esc in the upper left corner of the keyboard to exit insert mode and enter command mode. There are several ways to exit:
    • Press shift+z+z to save and exit
    • First enter the colon **:**, then enter the following and press Enter
      (1) wq - save and exit (wq stands for write&quit)
      (2)

Guess you like

Origin blog.csdn.net/ZHorcrux/article/details/130208983