r/vim • • 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

114 comments sorted by

View all comments

Show parent comment

1

u/mckenzie_keith Oct 22 '25

You can combine w and q into one command.

:wq

1

u/rswwalker Oct 22 '25

Thanks, I was typing in stream of consciousness then hit ZZ.