Vi has two modes, insert mode and command mode.
When in command mode, type ZZ and it will do the equivalent of:wq.
Antonyms