Commands for using linxu system VIM editor

 

Press the ESCbutton to jump to command mode, then:

  • :w -Save the file without exiting vim.
  • :w file -Save the changes to the filemiddle without exiting vim.
  • :w! -Force save, do not exit vim .
  • :wq -Save the file and exit vim.
  • :wq! -Force to save the file and exit vim.
  • :q -Exit without saving the file vim.
  • :q! -Do not save the file and force exit vim.
  • :e! -Discard all changes and start editing from the last time the file was saved
  • Press enter to exit

Guess you like

Origin blog.csdn.net/weixin_45448980/article/details/114263573