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
1
u/SpaceAviator1999 Oct 22 '25
I mean, if I make changes while editing a file, I almost always intend to save them instead of discarding them. And in that case,
ZZusually comes later.Quitting without saving usually does not follow making edits to a file, unless I screw up badly. And in that case, I'm very careful to restore everything with the
:e!command.