A recent post on Reddit says: “2.1 million people visited the page ‘How do I exit the Vim editor?’ according to stack overflow survey”
This is very understandable. Let me answer this.
:Q! — exit without saving
:Q — exit / close window
:w — write / save file
shift-ZZ — exit (attempt, save if needed)
There you go. All of the wonderful and intuitive ways to exit VIM