Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Linux vim save command

Shulou Source: shulou.com Published: 2022-06-03 04:34:32 11月25日 Update

ESC key jumps to command mode

Then:

W Save the file without exiting vi

W file saves the changes to file and does not exit vi

: w! Forced save, do not launch vi

Wq saves the file and exits vi

: wq! Force to save the file and exit vi

Q: quit vi without saving the file

: q! Do not save the file, force to exit vi

: e! Discard all changes and edit since the last time the file was saved

Tags: File Enforcement Command Mode Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Shulou Information Shulou Tech Info macOS NVidia