My favorite big-brained way of quitting is ZZ (save and quit) and ZQ (quit without saving). Learned these shortcuts from a video by the legendary Luke Smith [1].
I test if qwen3.5-35B-A3B can exit vim when running in a harness that allows it to read the raw terminal buffer and send raw key presses to the terminal. Enjoy!
The irony here is I have been using vim for nearly 30 years and I actually do sometimes have problems quitting. Some background needed.
Obviously I know how to exit so it's not that. I always have the following remap in my vimrc:
> noremap :W :w
> noremap :Q :q
What this means is if I'm going fast I don't need to get my little finger off the shift between the colon and the w/q to quit if I do it that way. Normally I quit using "ZZ" which doesn't require any shenanigans but whatever.
However, if I'm sshed into a remote machine or on a different account/in a docker container/vm or whatever and I don't have my .vimrc around most things are completely fine[1] except that I occasionally have some cognitive dissonance when I try to quit and nothing happens because I have subconsciously done ":Q" instead of "ZZ" or whatever, and my brain does a brief double-take before realising what happened.
[1] Yes you don't need a highly customized vimrc to function - most defaults are OK especially if you can load vim-sensible
The AI model is likely trained on Stack Overflow posts, or otherwise related content from wherever off the internet, so most likely it will have ripped off enough hand-written posts or articles on how to quit Vim. So of course it can regurgitate the required keystrokes on command.
And will the writers of those posts, who contributed their knowledge to help out their fellow humans, get a fraction of a penny for the hundreds and thousands and millions of dollars of profit the AI corps are making off the backs of their labour? I somehow doubt it.
1. https://lukesmith.xyz