xxxxxxxxxx
to save: press Esc key, type :w and hit Enter key.
to save and exit: press Esc key, type :x and hit Enter key.
to save: press Esc key, type :w and hit Enter key.
to save and exit: press Esc key, type :x and hit Enter key.
xxxxxxxxxx
to save: press Esc key, type :w and hit Enter key.
to save and exit: press Esc key, type :x and hit Enter key.
to exit and NOT save: press Esc key, type :q! and hit enter
https://www.cyberciti.biz/faq/linux-unix-vim-save-and-quit-command/