You're probably in editing/insert mode. You need to type the following sequence :
[LIST=1]
- Esc, to quit edit mode and fallback to command mode ;
- :wq, start with a : (colon) then press w and finally q to write and quit (or just :w to write without quitting)
- then press Enter to valid.
--
Ref: askubuntu.com/questions/252760/how-do-i-save-files-edited-with-vim