Can AI Exit Vim?
theadamcolton.github.ioTurns out this was the real test of Artificial General Intelligence all along.
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].
Wow, this is so much easier than what i’ve been doing:
:call system('kill -9 ' . getpid())
Brilliant. When is the next International Obfuscated Vim Exit contest?
Vimscript is extremely token efficient and very common in training data.
Dunno about constraining to a window, but vimscript itself could be a good way of sending editing commands.
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!
what harness do you use ?
I wrote it myself it python. The model runs in a loop and can either read the terminal or input keys. If it does neither the loop exits.
Obvious question demands an obvious answer. No. No-one can exit vim.
I started using it nearly 30 years ago now and there is still no end in sight. I’m pretty much convinced it’s just not possible at this point.
Did you try turning your computer off and on?
It boots into Vim.
:!poweroff
Sorry! It should work now.
Thanks
:wq!
remove the trailing slash