Or 3. Hold shift, press ZZ to save and quit ZQ to quit without saving.
ZZ
ZZ Write current file, if modified, and close the current
window (same as ":x").
If there are several windows for the current file,
only the current window is closed.
ZQ
ZQ Quit without checking for changes (same as ":q!").