How do you exit Vi?
To exit Vim, press
Esc, type :q and press Enter; to exit without saving, use :q!, or to save and exit, use :wqEsc, type :q and press Enter; to exit without saving, use :q!, or to save and exit, use :wq