top | item 40403115

How to Exit Vim

56 points| WayToDoor | 1 year ago |github.com

24 comments

order

fallingsquirrel|1 year ago

Walk over to that one guy's desk at the office, you know the one. Ask for his help. Then you just have to wait through about 5 minutes of "Modal editors are very simple once you know how they work! A command is composed of..." and after that he'll tell you what keys to press.

callamdelaney|1 year ago

I assume somebody thought this was funny?

kristopolous|1 year ago

A lot of people did, look at the contributors

There's this subculture in the computer world, the pinnacle of which is arguably still Eric Raymond's Jargon File (http://catb.org/jargon/html/) which I could never connect with it.

sodapopcan|1 year ago

I think it’s funny, though didn’t have the attention span to read through all of it.

johnnyanmac|1 year ago

Humor is subjective, but for me it was one of those chuckles that turned into "this is getting too long". And then you realize it goes on for so long with so many technologies that it loops around to being funny again, or simply impressive at what a high effort troll this was.

rajamaka|1 year ago

I've seen this shared around amongst devs in 3 consecutive jobs I've worked at, so yeah probably a few people.

ghostly_s|1 year ago

I guess. It is non-ideal how unintuitive it is to exit vim, but esc-esc-q-! is really not that complicated.

chimpansteve|1 year ago

I love Vim. I use it pretty much exclusively. I found it very funny.

So, yes.

aussieguy1234|1 year ago

If you do the first example, won't that lead to a .swp file still being present, then a warning next time you start vim?

nvy|1 year ago

<lobbing hand grenade>

Modal editing is fundamentally-insane UX.

sshine|1 year ago

I remember one “how to exit vim” tutorial that explored key combinations that would exit vim regardless of what mode you’re currently in:

:q! works in command mode, but obviously not in insert mode. <ESC>:q! works in insert mode and incidentally also in command mode, but not in ex mode (extended command mode)! And so on, a longer and longer command is built that neutralises the current mode and whatever side effects that the key combo itself causes.

BxGyw2|1 year ago

I mean maybe, but I sure edit shit fast

xigoi|1 year ago

Would you mind to elaborate?

skygazer|1 year ago

Handy reference. I typically use a variant of "the suspend way," but I might try "the canonical way" one day.

akdor1154|1 year ago

I didn't get that far on first read, I assumed the Canonical way was "snap install vim; vim; systemctl stop snapd" or something.

lvlabguy|1 year ago

out-of-band way:

echo "cd /system1/pwrmgtsvc1; reset" | ssh -T ADMIN@<BMC-IP>

jonwinstanley|1 year ago

Bravo. Plus makes for an excellent demonstration of the flexibility of unix

mmastrac|1 year ago

My go-to:

`Ctrl-Z, kill -9 %1`