How to Exit VIM

  • Want to save changes and exit? Esc + :wq + Enter
  • Want to exit without saving changes? Esc + :q!

Steps

  1. Exit edit mode: Press Esc
  2. Enter quit command (choose one):
    1. Quit: :q
    2. Quit without saving: :q!
    3. Save + Quit: :wq
  3. Press Enter

Published