How do I save and quit in vi?

Lâm Phung

New member
How do I save and quit in vi?
Answer
Save a File and Quit Vim / Vi
The command to save a file in Vim and quit the editor is :wq . To save the file and exit the editor simultaneously, press Esc to switch to normal mode, type :wq and hit Enter . Another command to save a file and quit Vim is
.
 

Tìm kiếm

Back
Top