News for hackers. Stuff that matters.
Re:How to Exit Vim by talles on Wednesday January 08, 2020 @07:18AM (#21990710)
Jokes aside, shouldn't the page start with actually teaching how to quit vim?

The page is considerably popular to show up on a Google search. I imagine the frustration of a beginner actually trying the first examples and not getting the joke immediately.

Re:How to Exit Vim by Lio on Wednesday January 08, 2020 @07:40AM (#21990851)
Yeah, I mean if you really wanted to help people exit Vim you'd trap Ctrl-c in command mode and print the instructions at the bottom of the screen.

Something along the lines of "Type :qa and press <Enter> to exit Vim" would probably do it...

Re:How to Exit Vim by PandaWhisperer on Wednesday January 08, 2020 @07:56AM (#21990950)
At this point, learning how to exit vim by yourself is just standard hazing practice for new devs.

It's not a bug, it's a feature.

Re:How to Exit Vim by Kye on Wednesday January 08, 2020 @08:01AM (#21990998)
This kind of advice confused me early on because I didn't realize the : was part of the command for way too long. For beginners, you might want to spell it out further as: "shift and the : key, then qa, then Enter"
Re:How to Exit Vim by Lio on Wednesday January 08, 2020 @08:06AM (#21991033)
I think that's a great suggestion and probably gets the root of the whole exit vim meme.
Re:How to Exit Vim by nj65537 on Wednesday January 08, 2020 @08:58AM (#21991442)
I don't have a qa key though
Re:How to Exit Vim by Lio on Wednesday January 08, 2020 @03:28PM (#21995440)
I’ll laugh about this now but then probably find out later that it was actually based on an obscure teletype terminal that actually had an “qa” key.
Re:How to Exit Vim by JdeBP on Wednesday January 08, 2020 @09:38AM (#21991800)
You're only targetting old 1970s terminal users, there, though.

If you wanted to also help slightly more modern users who are used to CUA conventions from GUIs, you would have the [F1] key bring up some form of help screen, which said something like "Get out of Vim: Use :qa!" at the top.

Re:How to Exit Vim by Kerrick on Wednesday January 08, 2020 @11:33AM (#21992905)
You're only targeting old 1990s GUI users there, though.

If you wanted to also help silghtly more modern users who are used to discoverable-UI conventions from mobile apps, you would have it so shaking your device brings up some form of chat bot, which would suggest asking it how to quit Vim.

Re:How to Exit Vim by JdeBP on Wednesday January 08, 2020 @12:24PM (#21993563)
1980s. [F1] is CUA 1987.

And one of these ideas is not like the others.

Clippy, please tell everyone how Lio's and my if-only-VIM-did-this ideas are different to Kerrick's idea.

Re:How to Exit Vim by fourthark on Wednesday January 08, 2020 @08:09AM (#21991054)
Yes, the version on my machine prints

    Type  :qa!  and press <Enter> to abandon all changes and exit Vim
Re:How to Exit Vim by petepete on Wednesday January 08, 2020 @07:34AM (#21990810)
I'd bet that most people who get stuck don't start vim themselves though. I taught (the basics of) git to a bunch of students recently and the first time we did a commit I had to go around the room and show people how to operate vim. I bet the same happens when new people use visudo, etc
Re:How to Exit Vim by noisem4ker on Wednesday January 08, 2020 @07:27PM (#21997297)
This is why vim is a bad default. Thankfully, there's someone thinking about changing this [0].

[0] https://www.phoronix.com/scan.php?page=news_item&px=Fedora-W...

Re:How to Exit Vim by kungtotte on Wednesday January 08, 2020 @07:38AM (#21990836)
I don't know about vim, but in neovim you're greeted by the following when you launch it the first time:

type :help nvim<Enter> if you are new!

type :checkhealth<Enter> to optimize Nvim

type :q<Enter> to exit

type :help<Enter> for help

This joke is pretty outdated :P

(But still kind of funny)

Re:How to Exit Vim by DarkWiiPlayer on Wednesday January 08, 2020 @07:42AM (#21990858)
You get the same thing in vim, but only when you open it without a file. Chances are, you only do that when you're already a vim user, and most non-users will be confronted with any random program opening a file in vim for them to edit (visudo, git commit, etc.)
Re:How to Exit Vim by thaumasiotes on Wednesday January 08, 2020 @08:54AM (#21991390)
git will open pico if you haven't configured an editor. It's annoying.

If you have configured an editor, hopefully you already know how to quit.

Re:How to Exit Vim by samatman on Wednesday January 08, 2020 @12:42PM (#21993775)
It has to open something, and pico/nano, at least, has a menu that tells you how to quit. What else would be a preferable default?
Re:How to Exit Vim by thaumasiotes on Wednesday January 08, 2020 @03:25PM (#21995404)
I'm open to the idea that there isn't a better default, but that doesn't make it less annoying.

Another option would be to fail and prompt the user to configure an editor preference. That wouldn't be much different (to me) than what it does now.

Re:How to Exit Vim by screye on Wednesday January 08, 2020 @07:54AM (#21990936)
Nope.

The best thing that can happen to a beginner is they continue being frustrated with vim, quit it before they get in too deep, and just use shitty idees like the rest of us trash.

Re:How to Exit Vim by phkahler on Wednesday January 08, 2020 @08:11AM (#21991067)
My first go at vim was an accident. I was using git and ended up there. I later tried to change the editor invoked by git to something else, but have concluded that was dumb and the only real option is to learn vim. It's still on my todo list. As is the actual OSS work I want to contribute after climbing this hill. It should not be this way.
Re:How to Exit Vim by RawToluene on Wednesday January 08, 2020 @08:20AM (#21991148)
You don't ever tick that item on the todo list. Learning vim is a never-ending path to wisdom.
Re:How to Exit Vim by screye on Wednesday January 08, 2020 @11:41AM (#21992996)
VScode's text editing/ diff/ git tool is really good.

It helps that VScode is also my editor of choice in general.