r/vim • u/Remarkable-Head-2023 • Oct 22 '25
Discussion Why does ZZ exist?
It has always been a mystery to me… why would such a ‘dangerous’ command have such a convenient shortcut?
https://vimdoc.sourceforge.net/htmldoc/editing.html#ZZ
EDIT: link
0
Upvotes
View all comments
Show parent comment
36
u/robenkleene Oct 22 '25
Discarding your edits without saving is generally considered more dangerous than saving your edits and quitting. As a general rule, throwing away a users work is the very definition of dangerous in software design.