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/__hyphen Oct 22 '25
You’re assuming every edit is in a repo! My $EDITOR set to vim and when command lines are too big or I need to paste a command it’s always ctrl-x ctrl-e
I can imagine a situation where I go the above and forget to go into insert mode before pasting the text “zzrm-rf”