Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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...


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.


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"


I think that's a great suggestion and probably gets the root of the whole exit vim meme.


I don't have a qa key though


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.


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.


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.


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.


Yes, the version on my machine prints

    Type  :qa!  and press <Enter> to abandon all changes and exit Vim


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


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...


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)


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.)


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.


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?


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.


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.


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.


You don't ever tick that item on the todo list. Learning vim is a never-ending path to wisdom.


VScode's text editing/ diff/ git tool is really good.

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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: