Trần Thu Hằng
Member
How do I save a file in vi editor?
Answer
Use x to save a file and exit: Fig.01: Vi / vim save and quit demo.
To save and quit the vi or vim editor with saving any changes you have made:
Answer
Use x to save a file and exit: Fig.01: Vi / vim save and quit demo.
To save and quit the vi or vim editor with saving any changes you have made:
- If you are currently in insert or append mode, press Esc key.
- Press : (colon).
- Enter the following command (type
and press Enter key): x. - Press ENTER key.