How do I exit Vim?(stackoverflow.com)
stackoverflow.com
How do I exit Vim?
https://stackoverflow.com/questions/11828270/how-do-i-exit-vim
14 comments
esc esc esc :qa!<cr> (8 strokes)
This is the shortest I can think of right now, 3 esc to exit Ctrl-v, Ctrl-r and insert mode, then :qa! to quit even if there are splits or modified background buffers.
If ^C is considered one keystroke I'd replace all esc by ^C to prevent vim from hanging forever in the following starting situation: 999999999asometext^R^V<exit sequence>
With esc it would try to insert a lot of text after the last esc, which will make vim unresponsive for days at least.
Not sure if you want to count this one: alt+sysrq+k (1 stroke or 3 strokes depending on how you count)
This is the shortest I can think of right now, 3 esc to exit Ctrl-v, Ctrl-r and insert mode, then :qa! to quit even if there are splits or modified background buffers.
If ^C is considered one keystroke I'd replace all esc by ^C to prevent vim from hanging forever in the following starting situation: 999999999asometext^R^V<exit sequence>
With esc it would try to insert a lot of text after the last esc, which will make vim unresponsive for days at least.
Not sure if you want to count this one: alt+sysrq+k (1 stroke or 3 strokes depending on how you count)
> esc esc esc :qa!<cr> (8 strokes)
Yes, that seems quite complete against any preceding keystrokes I can think of, and agreed, it's better to use ^C instead of ESC.
However, your friend's environment variables caused vim to be invoked with the -y flag (vim is famously difficult so they want to always use it in "easy mode").
Yes, that seems quite complete against any preceding keystrokes I can think of, and agreed, it's better to use ^C instead of ESC.
However, your friend's environment variables caused vim to be invoked with the -y flag (vim is famously difficult so they want to always use it in "easy mode").
This game isn’t winnable, because they could have run anything at all, via `!`
Including another copy of vim. Or emacs. Or both!
Including another copy of vim. Or emacs. Or both!
Alt + SysRQ + b
Reminds me to the infamous "Type /wave to Gor'groth" from WoW
Player A suggests a sequence of keystrokes that supposedly works.
Player B explains why that sequence doesn't work. For example, if A says "esc colon q ! enter", B can counter with "your friend was in insert mode and had pressed ^V".
I thought the shortest winning sequence had seven keystrokes but it turns out it wasn't enough.