r/programming • u/variance_explained • May 23 '17
Stack Overflow: Helping One Million Developers Exit Vim
https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
9.2k
Upvotes
1.5k
u/HeimrArnadalr May 23 '17
Alternatively, it could mean that people in China, Korea, and Japan are still stuck in Vim to this very day.
Also, that should read "one-tenth as much", not "a tenth smaller". If it were "a tenth smaller" then those countries would be around 5.5% instead of 0.5%.
54
u/highres90 May 23 '17
No way! I literally googled and SO solved this for me today!
163
u/Slugywug May 23 '17
That graph of which language
will surely be a big surprise.
308
u/k-selectride May 23 '17
I wonder how many people need help after hitting Ctrl-s
832
u/skztr May 23 '17 edited May 24 '17
My "how to use vim" guide in every wiki I've ever made for a company includes only the instructions:
If you're in a position where you need more instruction than that, you probably already know how to use vim. If you don't know how to use vim, those are the only instructions you will ever need.
.... FFS after typing this comment I swear to god I just typed ESC :wq
edit: As several people have mentioned that the command should probably include an exclamation point, I logged in to an old wiki I currently have access to in order to copy the actual text verbatim:
--------8<---------
vion many modern servers (including our own), actually runs vim in “compatibility mode”. If you don't already know how to use it, you should do this::q!(that is: colon, q, exclamation mark)This will exit the editor without saving changes.
If you really want to use it, see: http://www.vim.org/htmldoc/quickref.html
-------->8---------
66
u/orwiad10 May 23 '17
I never get stuck in vim, I just kill ssh and re-login.
554
u/Yehosua May 23 '17
Exiting Vim is easy.
Esc, Alt-X, Ctrl-Q, Ctrl-C Ctrl-C Ctrl-C, "ARGH", Alt-Tab to another window,
killall -9 vim42
u/RandCoder2 May 23 '17
If you get tired exiting vim, just sleep a bit: ZZ
55
u/[deleted] May 23 '17
I exited vim once. Never went in again.
92
u/gastropner May 23 '17
ITT: Things are easy if you already know them!
214
u/ggtsu_00 May 23 '17
Asians: Reads the manual before asking.
Eastern Europeans: Ask before reading the manual.
69
u/Jibbers_Crabst_IRL May 23 '17 edited May 24 '17
Next month on StackOverflow's blog: Helping Over 100 Developers Exit Emacs
Edit: FFS people, it's a joke
37
u/MetalDart May 23 '17
I wonder if China having qq as part of their culture helps at all haha
36
u/odoisawesome May 23 '17
I've been stuck in vim for the past 3 years, plz send help. Running out of food and water. Losing hope. I thought this article would help me, but it only told me about how many other people are trapped.
9
u/Fenris_uy May 23 '17
I think that a lot of people didn't understand the country graph. It's not about which countries go more to that page, it's about, of the people from that country that go to vim questions, how many go to the question about closing vim.
9
u/benharold May 23 '17
In case anybody in this thread actually wants to become proficient in vim keybindings, there's a game called vim adventures that I highly recommend.
31
u/Acaila May 24 '17
Vim has 2 modes, one where you find out your PC still has internal speaker, and one that corrupts your data.
102
u/Veliladon May 23 '17
Nano helpfully puts the shortcuts for what you're looking for down the bottom. That's why I use it instead of VIM.
7
u/[deleted] May 24 '17
Vim is the only editor that doesn't leave :qw throughout your code.
21
u/yawaramin May 23 '17
Why would you want to ever exit vim, though--it's so useful?!
😆 here's my vim story. Well, vi story to be exact. I didn't have a great internet connection growing up and had a lot of trouble before I finally managed to install a Linux on my PC. Anyway, in the meantime I'd bought Peter Norton's Guide to Unix which was a great intro to Unix and all its old-school classic systems and commands (vi, ex, mailx, roff, UUCP, chmod with the octal permissions, etc.).
I taught myself vi using that book, reading through and memorising a lot of the commands. When I finally did manage to boot up my first Linux distro (Slackware), vi was one of the first things I tried (and enjoyed immensely). I didn't know about vim at that point.
6
u/jclancy_from_so May 24 '17
Hey, so this is actually me. I wrote this question back when I started using R, which uses vim as an in-"IDE" editor. I'd never heard of vim and had no idea that's what it was. I'm honored to have gold given in my name, on the programming sub no less.
5
u/[deleted] May 24 '17
I've been using vim for years now. Mostly because I can't figure out how to exit it though.
13
u/freeradicalx May 23 '17
Used to happen to me all the damn time. Any decently long command line process inevitably had some step where I'd have to edit something in vim, and I remember always taking a breath before hand and thinking "OK, this is the part where I have to mash keys to get back to where I was.... Here goes..."
Then I got a job that basically necessitated using vim every 5 minutes or so, took the 10-15 minutes of time out of my life to learn the essentials, and it hasn't been an issue since. I actually really like vim, for all it's little annoyances. It's emacs that scares me these days.
50
u/jmblock2 May 23 '17
ITT: and how many of the people looking up this question know the command line interface to grep, sed, rsync, systemd, ssh, yada yada. I don't think it is unreasonable to have to have some prior knowledge to use a tool, and a damn good one at that.
15
u/TwoSpoonsJohnson May 23 '17
This has to be the most statistically sound manner in which anyone has ever been roasted.
t. vimmer
11
u/faustpatrone May 23 '17
:q!
4
u/Kanzlerforce May 24 '17
Kinda surprised the overzealous moderators over there haven't flagged/tagged/marked it "closed as not constructive."
4
u/webauteur May 24 '17
Oh, I thought they were bragging that they helped one million developers to quit using Vim. Now that would have been an accomplishment worth bragging about!
4
u/pbrettb May 24 '17
Ctrl-X Ctrl-C right?
10
u/[deleted] May 23 '17
Wow this makes me so mad!
:x
11
u/Ahhmyface May 23 '17
C-x C-c
10
u/PythonPuzzler May 23 '17
!! NOTE: Before executing any of the steps below, read this entire lesson!!
NOTE: :q! <ENTER> discards any changes you made. In a few lessons you will learn how to save the changes to a file.
5. Move the cursor down to Lesson 1.3.
8
u/Dunge May 23 '17
I admit having visited that page,.. more than once.
3
u/LesterKurtz May 23 '17
it's still easier than exiting emacs
3
u/xubaso May 24 '17
Exiting vim for advanced users: :!kill -9 $PPID
3
u/beerhiker May 24 '17
why would you want to exit?
3
u/proper_lofi May 24 '17
Ed is standard!!!
4
u/GrandmaYogapants May 23 '17
ESC if in INSERT :wq!
4
u/d70 May 23 '17
Exiting Vi was taught in the very first CS when I started college. Anyway, I saw the title and initially thought it meant people wanted to migrate away from Vim but couldn't stand living without it.
2
u/prelic May 24 '17
Vim is so awesome, it shouldn't get any hate. Once you get the basics it's awesome. I learn cool shit all the time. For example, vim -d is a great diff tool if you're headless/no X11/etc.
2
u/[deleted] May 24 '17
<esc><esc><esc><esc> ZZ
2
u/michaelpaoli May 24 '17
vim annoys me ... lots. Typical examples:
Lots more examples:
vim annoyances
nvi(1) rocks! :-) nvi(1) is also vi(1) on BSD systems.
2
u/ganjapolice May 24 '17
We use git for source control and the number of people who get stuck when git opens the auto merge commit message in vim is ridiculous. They don't even know it is vim so they don't even know what to google for.
2
u/Only_As_I_Fall May 24 '17
My goto is suspend->kill...works consistently across applications
2
u/bravepuss May 24 '17
This is wrong. He did not help one million developers. I just forgot 500,000 times.
2
u/Jabulon May 24 '17
how useful is this site tho?
2
u/drtdeedz May 24 '17
I use vim almost on a daily basis and the only commands I remember are
:wq :q! and dd
I can't even remember how to get to the end of a line without my cheat sheet.
2
u/vijeno May 24 '17
TIL: Austrians do not get stuck in Vim.
2
u/BadBoy6767 Jul 21 '17
I sympathize for my people in first place
4
u/punisher1005 May 23 '17
True story: I rebooted a box once because I couldn't figure out how to get out of VIM.
9
u/[deleted] May 23 '17
If that many people struggle it's a bad design.
3
u/tejaslok May 24 '17
Next in line should be "how to exit Emacs".
3
u/urbn May 24 '17
Anyone else annoyed that in the article they didn't say how to actually exit Vim?
3
u/JohnBoyAndBilly May 23 '17
:wq or :q!
Is it really that hard?
2
u/roselan May 23 '17
And what's the command to exit reddit?
2
u/dekmaskin May 23 '17
It's easy, just restart the ssh session
2
u/[deleted] May 24 '17 edited May 24 '17
edit:
2
u/Daxiongmao87 May 23 '17
Just curious, why is vim so much more popular than nano?
2
u/zeekaran May 24 '17
I'm a programmer and I have no idea what vim and emacs are. I've never used them and I expect I won't.