Stack Overflow: Helping One Million Developers Exit Vim
This morning, a popular Stack Overflow question hit a major milestone:
You’re not alone, jclancy. In the five years since this question was asked, there have been over a million other developers who got stuck in Vim and couldn’t escape without a bit of help. Indeed, the difficulty of quitting the Vim editor is a common joke among developers.
I’ve been told by experienced Vim users that this reputation is unfair, and I’m sure they’re right (even I’ve gotten the hang of it in the last few years). I think there are two reasons it’s easy to forget how to exit Vim: developers are often dropped into Vim from a git command or another situation where they didn’t expect to be, and they run into it infrequently enough to forget how they solved it last time.
In honor of this milestone, we decided to take a look at the data surrounding this question. In particular, we’ll try measuring who is most likely to get stuck in Vim as opposed to using it intentionally, and examining how that balance varies by country and by programming language.
How many people have been struggling to exit Vim?
In the last year, How to exit the Vim editor has made up about .005% of question traffic: that is, one out of every 20,000 visits to Stack Overflow questions. That means during peak traffic hours on weekdays, there are about 80 people per hour that need help getting out of Vim.
Has the percentage of traffic it makes up changed over time? That is, have developers started learning to exit Vim on their own?
It doesn’t look like it. The question was asked in August 2012, and for a few months it got very little traffic. Then it began growing in the following two years, presumably as more sources linked to it online and it moved to the top of search engine results. It’s been relatively steady for the last two years. This doesn’t necessarily mean the same people visited it again and again, of course; it could represent relatively new programmers getting stuck in Vim for the first time.
Differences across countries
As we saw in a previous blog post, we can use Stack Overflow traffic to learn a lot about the geographical distribution of developers.
Let’s consider what percentage of visits to Vim this question comprises within each country. In countries with a lot of experienced Vim users, we’d expect this percentage to be low. When it’s high, it indicates many users got stuck in Vim when they didn’t necessarily expect to.
It looks like developers in Ukraine, Turkey and Indonesia are getting stuck in Vim quite a bit: it makes up a larger portion of their Vim questions than in any other country. In contrast, in China, Korea and Japan the fraction going to this question is one-tenth as much. That might indicate that when developers in these countries enter Vim, they usually meant to do so, and they know how to get out of it.
What kind of programmers get stuck in Vim?
It’s also likely that users of different programming languages will have different experiences with Vim. We can investigate this by stratifying the “Exit Vim / Total Vim” percentage across each user’s main programming technology.
We’ll define this based on what Stack Overflow tag they visit most often. (For instance, my most visited tag is R: it makes up 52% of my question views). It’s not a perfect measure, but it’s reliable enough to give a sense of the breakdown by language. (For this analysis, we considered only registered users with at least 100 visits to the site).
The developers who are most likely to get stuck in Vim are front-end web developers: those who primarily visit tags like JQuery, CSS, and AngularJS. They’re followed by Microsoft developers (C# and SQL Server) and mobile (Android and iOS). These developers usually work with an IDE (Visual Studio, Eclipse, Xcode, and so on), rather than a plain text editor, so it makes sense that they’re relatively more likely to get “stuck” in Vim rather than to open it intentionally.
The developers least likely to get stuck in Vim are those who program in C, C++, Python and Ruby. These languages make sense to me: they are a combination of low-level languages and scripting languages that are often used with a plain text editor rather than an IDE, so they have the experience to escape it without a Google search.
I was amused when I saw this question approach a million visits, but I was also proud that I work for, and contribute answers to, a site that helps so many developers. You never know when an answer you contribute could help millions of people, whether it shares how to undo a git commit or how the yield keyword in Python works.
If you want to contribute yourself, we encourage you to join the world’s largest developer community, whether it’s to ask and answer questions, get your next job, or build your online presence with a Developer Story. You can also use tools like Stack Overflow Trends to learn more about what our data can tell you about software developers.
In any case, next time you solve your problem through Stack Overflow, remember the hundreds of thousands of users who regularly ask, answer, edit, and moderate the site to make it all possible.
Good read. 😀
VIMter is coming!
The guy that wrote the original answer is the chief architect of MaidSafe!!
“For instance, my most visited tag is R”
After this post, I am not surprised. :v
Brilliant, but where’s the Larry Tesler #nomodes reference?
I could memorize how to use Vim. I’d just have to erase my childhood and other unnecessary memories to make room. Hopefully it works out better for me than Keanu.
using vim has been the only worthwhile childhood memory for me.
Another form of asking the same question. 😛
I’m always searching at SO how to “visual block edit in vim”. Tried to memorize, but always failing to do it correctly from first attempt 🙂
I love that this is a thing
Could be worse. They could be stuck trying to exit Emacs.
That WOULD be terrible — if you’re trying to leave, you’re not using it right.
Could even be worse. They could be trying to save on a terminal with software flow control.
emacs is NOT an operating system! ha ha ha……
Lol! I remember the days of first learning Emacs…, but at least Emacs at least has a navigable menu bar with mouse support (even in TUI mode). Of course, using it is shameful thing one should never admit to ;).
Always save you work, you dolt!
I am a `:x` kinda guy
I’ll take :wq thank you very much.
depends. Did I accidentally open something? but yeah, I find myself doing :wq in atom all the time.
Well, in these users’ cases, it’s more like, “Did I accidentally open vim then type a bunch of normal mode commands that made a whole bunch of edits I have no idea how to undo?”
How it fares in per capita? Stuck in vim/vim users in country and stuck in vim/programmers in country?
This is hilarious. I want to see the OS breakdown!
I would rather bet for a high windows percentage. Haven’t you read wholly the article? It even gives a hint at why we may guess that: Git dropping you to vim in some circumstances. It does that under windows too. There, windows dev having no knowledge of vi are very likely to get stuck. (I have only used Git under windows, but I am also a long time user of Linux. I was quite surprised when Git first dropped me in vim, but that was not an issue for me.)
It’s just a traditional thing, carrying a message to newcomers. Something like:
Welcome to Linux, where You can’t escape pretty simple. Get ready for the most horrible user experience you’ve seen in your life, because developing standards is something you wouldn’t expect in GNU community.
My country is not in the list… is that meaning we never get stuck???
…or is it because we learn first to use kill -9 and then VIM?
Your country may not have more than the 100 million visits needed to make the cut.
your country (like mine) probably uses notepad.
Uhmmm…more like edlin maybe!
Meaning that, there are very few developers. And among them, only few portion use vim. Probably, they don’t use linux or they are in nano.
“In contrast, in China, Korea and Japan the fraction going to this question is a tenth smaller. That might indicate that when developers in these countries enter Vim, they usually meant to do so, and they know how to get out of it.”
While users of Vim in countries with non-Latin, multi-byte alphabets might know how to quit the editor if they can get it to work, it may be that the number of users is tiny because getting it to work is hard, and getting stuck is the least of their problems with it.
It may also indicate that SO is rather irrelevant in those countries, as is Google.
It’s a percentage of vim users visiting SO, however. So it already accounts for people who are only visiting SO. How they actually calculated that, who knows.
sample size might make a difference, but idk how significant that is.. Also does China’s GFW block Stackoverflow?
This is great. Thanks for making this a thing.
I thought I would read an answer on how to switch to Emacs 8)
Same here, I thought SO is helping people move from vim to emacs, lol
I just got one question what the hell is a emac
I think the reason Chinese developers are not getting stuck in Vim is because they’re not using Linux in the first place. Most of them are on Windows.
You can use Vim in Windows
It’s much less likely that a Windows user opens Vim accidentally and isn’t able to close it
So? I didn’t say the opposite. ¯_(ツ)_/ ¯
Doesn’t matter whether you can use Vim on Windows if it doesn’t happen by accident.
Sure, 100% of Windows users know what they are doing all the time.
Now you’re just being silly on purpose.
From my experience, this does not hold true. 100% of my Chinese friends are all on Arch.
The last time I had to work with Chinese developers was a while ago so I could be wrong, but then I was working on Discuz! so I guess the community is different.
Emacs is much worse. At least it is easy to remember for Vim (‘q’ for quit).
You’re treading dangerous water there my friend. Be careful 🙂
pfff windows, what a pleb
Spacemacs to the rescue.
Actually, ^X^C is the standard syntax for emacs…. on any platform I’ve ever used.
Not in the actual Emacs editor itself. Run “emacs” with no arguments and observe the syntax in which shortcut keys are listed. But I guess you’ve never used the emacs platform. 😀
What an odd thing to guess. Run “emacs -q” for a no-init-file startup, actually. Your first screen has a standard toolbar with a standard File -> Quit sequence. The main display has an “Emacs Tutorial Learn basic keystroke commands” link that you click or hit RETURN on, and the first thing it tells you is to use the CTRL key and type C-x C-c to exit.
Ctrl + X -> command mode
Ctrl + C -> Terminate process (like a terminal process)
Emacs being non-modal doesn’t need you to change states before the commands you know will work.
Intuitive is not a real thing. You’re gonna have to learn commands no matter what editor you use. So with emacs, at least you only need to type them once.
I’m surprised the US or UK doesn’t get stuck very much to be honest.
quick way to exit of vim “`SHIFT q + q“`
Triple single quotes, you bastard!
my mistake it’s not quotes its markdown back-ticks
my mistacke its not quotes its backticks
Could you maybe elaborate a little bit on how to exit I pressed shift q and it did not work
If you’re still using Vim to code (instead of a modern IDE) you’re a. incredibly old b. incredibly good c. incredibly stupid or d. an incredible hipster.
My guess is it’s 4% a & b and 96% c & d.
You forgot e. All of the Above
But to be honest I wind up using it for sysadmin tasks quite a bit. You always know vi will be there.
That’s vimctim blaming!
You forgot e. lazy to learn another IDE. I’m 100% that one.
I use the VIM plugin in IntelliJ for Scala and all other development. It’s bliss.
This guy got stuck in VIM
phenomenal tactic to stick that “incredibly good” in there so that folk like me can’t quite justify a downvote
What about Haskellers? It’s kind of the best Haskell ide with all the plugins. Although Atom is nooice for the job too.
I use vim because I’m an SRE, so I spend a lot of time working on various remote servers (often through several ssh chains). There’s really no good option other than a terminal-based editor for this, and if I’m going to spend a lot of time polishing my use of that toolset, I might as well use it the 20% of the time I’m local as well.
vim *is* a modern IDE 😉
e) all of the above
never used an editor with better shortcuts
I’m fine with a,b,c,d whatsoever.
how to exit comment
Sublime to Intellij.
I did’t know 2015, 2016, … are months. https://uploads.disquscdn.com/images/331b453e9dfe3ea91460b73c1bdbeac5e3b974f4e1798aab9b714ac075d0a5a8.png
Each data point seems to be a month, but if they showed months in the ticks, I don’t think they’d be readable.
Quickest way to quit vim: `Ctrl+z`. 😁
Then a quick reboot to remove the process. 🙂
kill -9 %%
Neophytes don’t understand that Vim has two modes: there’s “beep mode”, where any character just rings the terminal bell, and there’s “nothing mode”, where keys don’t seem to do anything at all.
Hope that helps!
In my experience, not knowing how to use Vim results in a bunch of unexpected things, not nothing at all. What do you call that mode?
One explanation for the lack of traffic from China could be self-selection – users from China have to penetrate language and often a firewall barrier to visit stack overflow, it’s possible that they are more experienced in general.
AFAIK, 1) stackoverflow is not banned in China at least for the past 5 years. 2) Most Chinese developers learn English since junior high school (7 grade). We need more data like ‘total number of visitors from each country’ to better explain it other than blindly guessing.
As a Chinese engineer who currently works in US, I believe it’s because:
1) developers are not comfortable talking/thinking in English even tho most of them started learning English since young ages.
2) searching English contents using Baidu is a pain in the ass. It’s horrible. Nobody wants to do it. Besides, you can find the same answers to the same questions in Chinese fairly easy. So no traffic from these people to SO at all.
3) People who do have the English skills and need for answers of more complicated questions will def use SO. But then again, those are very unlikely click on questions such as ‘how to quit vim’.
Ukraine based criminal hackers should not be assisted in configuring malware. How about telling them to go fornicate themselves? (Ukraine is the #1 source of all malicious attacks against WordPress and other websites over the past year or two).
The criminal hackers do their crimes without at least a VPN tunneling them to some other country?
1. A lot of these criminals are not sophisticated. They are just contracted by larger organizations to distribute malware. They use vim to set up configuration files.
2. If Ukraine is hosting VPN providers for these individuals and organizations, then they are culpable accessories to crime.
They use Vim to set up configuration files, but they don’t know how to use it?
Doh! That’s the whole point of this Article. Apparently thousands of vim users do not know how to “exit vim”. And yes… I can fully believe that thousands of people in Eastern Europe are joining the criminal hacker “industry” with minimal computer skills … including needing to learn “how to exit vim”. This is just a theory as to why the traffic for that query is so high from Ukraine. There is obviously a correlation; but not proof.
I realize that’s the point of the article, which is why I brought it up. If they don’t know how to use Vim, they probably don’t use it for their configuration files. It’s most likely for something they don’t do very often.
The question may be curiosity-driven. In Eastern Europe, such things as VIM are fascinating, but we’re rarely interested enough to get systematic knowledge of them.
I’d say front-end developers stuck in Vim are quite unlikely to be malicious hackers.
A lot of these criminals are not sophisticated. They are just contracted by larger organizations to distribute malware. They are told to use vim to set up configuration files.
Are you suggesting we deny millions of people an answer because hackers use vim? lol
Hackers use computers. By your logic, no one should answer any computer questions because it would help hackers.
Habitually I press ESCAPE then :wq! kids these day, geeze
you should be using :x!
It saves a key stroke.
Don’t use VIM at all, it saves ALL the keystrokes
Could also do just :q!
No, it’s one keystroke more (the exclamation mark) and it does not have any benefits over “:x”.
Escape, then save and quit kids? That sounds like a handy trick for outings to family restaurants. =)
Vim and Bc are too good for SIGINT
We’ve all been stuck inside vim at least once in our life.
:! sudo rm -rf /
pretty much, who takes joy out of that? There might be noobs reading this….fucked up
Getting out of Vim is easy. Getting stuck in ex mode is where the true depths of hell lie!
Also: I love that this page is a thing which exists. Just what my day needed.
Or when you start pressing buttons and find yourself in ‘recording’ mode, whatever that is. I usually just restart my computer haha.
Haha, I feel your pain, but once you find out what it is, it’s actually very useful, I promise!
It records one’s keystrokes into macros. It’s really handy for when you have some repetitive task that’s not quite worthy of running through a shell script or somesuch.
Still, even as somebody who’s reasonably well-versed in Vim, I occasionally find myself accidentally enabling it and getting annoyed. 😀
The hell man! recording mode lets you crate macros, macros are one of the reasons vim beat the shit out of “advances editors” like sublime text or other ides
what’s wrong with nano?
How much time do you have?
It’s not Pico
lack of syntax highlighting for a starter. and the annoying confirmation prompt of the filename when saving an edit to an existing file (dunno if you can disable that)
It has syntax highlighting
@ThiefMaster:disqus , nano has syntax highlighting for those that need it.
Nano is quick and easy, and perfect for my purposes, but I could well believe that vim has far greater functionality for those who wish to learn it.
There’s absolutely nothing wrong with nano @albertgomisverdu:disqus ! I love it and have been using it since mid 2000s. nano is super simple without the complexity of vi.
what’s wrong with pico?
What if you don’t want to save your changes? :colbert:
Yeesh, no need to get uppity about it! 😉
Well just typing smileys won’t help!
E492: Not an editor command: colbert:
😡 is shorter
open a new shell; killall vim
But more reliable is to execute `reboot` in a new shell. 😀
I have more trouble exiting nano
ctrl + o
ctrl + x
nano is even kind enough to constantly show you some help.
PS: Now, if you’re unfamiliar with the “^letter” prefix, that stands for ctrl + letter.
I get seriously disturbed every time I see nano set to the default editor on a server. I can’t agree more with you.
The hell when you forget to add a commit message to your commit… wooh.. git has some shitty ways of doing stuff
For me vi/vim is easy – it’s second nature…
I can’t say how many times I’ve typed ZZ into notepad though….
I frequently accidentally enter characters in other editors, text fields etc. when my muscle memory thinks it’s in command Vim’s command mode.
No so on notepad, notepad++ etc… all text editor I have typed esc : x! lololol
> That might indicate that when developers in these countries enter Vim, they usually meant to do so, and they know how to get out of it.
I don’t know, maybe they’re more likely to write “如何退出vim?”
or they don’t even use SO.
considering the population density, chances are that there’s someone near who knows how to exit 😛
You guys should read up on stats … Of all the Chinese vim questions, only 0.4% were related to exiting. Doesn’t matter the population density or what have you…
I think he was saying that there’s someone sitting nearby to verbally ask.
1. it was a joke
2. you should re-read my answer, think about it and see that i’m right 🙂
namely, there are X vim searchers in china and let’s say 90% of them are exit related. however, with my comment above, those 90% fall of… so only 10% of users actually become real SO registered vim searchers. obviously, since 90% of exit users got their answers in real life, only small % of them actually search for EXIT help.
this also could mean that china vim users are only good at exiting vim 🙂 but that’s totally different story.
p.s. stop being a wiseas* 🙂
What about how to exit emacs?
Emacs isn’t the default “`$EDITOR“` in most environments so git probably didn’t contribute to it’s views the way git contributes to this question’s views.
At least most of us have no problems starting vim 😉 Can’t remember if I ever managed to start emacs 😀
I couldn’t tell you, and I’ve tried to use it a few times. The real question is: how do you actually use the “help” program that inherits the finger-bending emacs interface. I’ve been through the tutorial at least three times and I can never use that thing without a manual (lol).
I just reboot my computer
There’s never any reason to exit emacs.
However, if you really feel feel the urge, I believe that the approved way is, Meta-!
shutdown -P now.
You have to call Richard Stallman. The issue is that he doesn’t use phone or email. You have to knock on his door.
or: how to get non-breakable password
Give frontend developer task to exit VIM and capture output when he quits trying 🙂
:Quit:QUIT:QUIT!:q:q:q:q:q:q:qq:qw:qw:save:save … etc
Hold the door! Hold the door! Holdthedoor! ….
I would say the blame belongs with whatever GUI tool they are using to do git commits, not with vim. Or, in my opinion, it lies with the misguided people who thought it made sense to avoid teaching a couple generations of developers/programmers/engineers how to use a posix-compliant shell and utilities. My university sadly went to Visual Studio to teach engineers how to program in C, so those after me will never even be exposed to gcc.
I’m also confused how people who use a GUI tool don’t just close the terminal emulator, or if they are using a shell how they wouldn’t know how to at least suspend a process and bring up a man page.
I am half convinced that most of the “hits” are people linked to it as a joke about vim’s unique interface (I am one of the C-searching vimmers who have been linked to it as a joke). If I recall correctly one of the comments goes something like “I’ve been using vim for 10 years.
I never could figure out how to quit.”
I doubt there’s much lost by ditching old editors.
My university made me learn to use vim, Unix shell, and gdb, but so far it’s been a worthless skillset.
In the cloud era, you’ll be thankful being able to use them on a remote server.
It’s annoying when you can’t just ssh in and do stuff.
If bash & vim & Unix tools in general are a worthless skillset for you, that means you never ssh-ed to a misbehaving machine to figure out what’s wrong. Never hacked together a proof-of-concept service. Never tried to figure out why your script spits outs some errors about a database it can’t find. It means your experience was limited to pristine conditions, and any troubleshooting was limited to opening a JIRA ticket. I guess you can make a living doing Windows programming or something, but never even trying to spin up a spin up a webservice, or logging in to your router? Jeez.
Never done anything cool on a Raspberry Pi. He’s missing out on a lot!
So you never use the shell or command-line programs (directly or indirectly) for anything you do? I know some environments let you get by without them (visual studio), but many still require that knowledge to do many tasks (project setup stuff like paths, compiler options, etc). I’m not sure how vim’s editing power would be useless, unless you were taught how to make it behave like notepad and nothing more. Even if I developed on VS I would get immense value from the vim emulation plugin (combined with intellisense it is a dream).
On that note, the CLI editors are not “old”, since they are very much current in terms of features, and cutting edge with some plugins. There’s a reason almost every editor and IDE has a vim compatibility plugin; it provides value. The same is true for why Microsoft has made powershell and added the WSL in the recent update.
Mine too, way back in 1988. Vi and Emacs. Use them all day every day.
BTW Emacs = editor for middle aged computer scientist.
Emacs is for middle-aged Lisp hackers, younger Clojure hackers, and everyone else with brains.
I have been making a good living as a programmer for 10+ years writing C# and VB in Visual Studio. Programming in college was mostly Java and C/C++ using Eclipse. I’m lost in vim but that’s never once caused a problem professionally because I take jobs looking for C#/VB developers. How can you say it’s “misguided” to teach/learn a programming language and tools that can literally sustain one’s entire career?
I said it was misguided to avoid teaching CLI tools and the shell, not that it was misguided to teach standard GUI tools. Note the difference.
Visual studio is perhaps the single largest area where knowledge of the CLI way is not helpful due to how tailored the system is to MS-specific workflows. VS is a fantastic tool that supports MS tech as good as anyone could ask for, but I can’t use it to code for (truly) embedded systems, or for any arbitrary project that I can use a programming editor for. Its integration is both its weakness and its strength. Perhaps the VS Code editor might fill that niche, but it does not compare to vim quite yet.
Microsoft has provided useful Powershell cmdlets for most of their tools, and things like tfsvc have powerful cross-platform command-line clients that can do more intricate tasks than the IDE interface, so you lose out by avoiding the command-line. And there is certainly a reason why they made Powershell and have committed to supporting it for all MS tools, and why they have recently added the WSL to get full GNU/Linux tools on Windows “natively”. They’re even updating the ancient Windows command prompt, so clearly they have noticed that these areas are lacking enough to want to do something about it.
Fun fact: it’s possible to know how and when to use plenty of command line tools, and *still* not ever use, or want to use, a clunky user-unfriendly tool like vim. I mean, use vim if you want, I won’t tell you not to, but “either you only use a single IDE interface and nothing else, or you use vim”, is pretty clearly a false dichotomy.
Can’t figure out how to exit an editor? Maybe it’s time to exit the profession… 😉
maybe it’s time to move forward. you know.. technology and shit. advancement. better things…
nothing wrong with using vim. It is installed by default on most linux distros meaning that you can edit code easily on any machine without having to worry about what editor/IDE is available. It is also extremely fast when you use it regularly. There is always going to be a use case for vim.
I would pretend to get angry, but that would just perpetuate a stereotype.
Go back to your visual studio
If there were something better, I would gladly use it.
That might be valid if vim or other CLI tools were not updated continuously with new features. With plugins you can get some bleeding-edge features lacking in common IDEs. With all of their recent support for CLI (Powershell, WSL, updates to the old cmd.exe console) it appears we must be moving forwards after all.
These are probably people who have never used it before, no need to be so obnoxious.
Bet you where born with that particular piece of knowledge on how to exit the vim editor, hu?
I logged into Disqus just to downvote you. An editor is an ephemeral tool to be replaced by the next whiz bang text processor. knowing or not knowing has no impact on your performance as a developer. Get gud.
I logged into Disqus just to down vote you for using the word ephemeral.
So euphoric, you must be, wizard.
Is that 1 million unique views?
No, we are dealing with a massive spread of multiple sclerosis
I would like to know how many of those were originating from making a simple `git commit` and forgetting to specify -m
> In contrast, in China, Korea and Japan the fraction going to this question is one-tenth as much. That might indicate that when developers in these countries enter Vim, they usually meant to do so, and they know how to get out of it.
I think that this just indicates that they don’t use English when searching on Internet.
All of the other Vim questions would also be in English, so how would that change anything? (Note that it’s percentage that is being charted here, not just number).
For Japanese developers in particular, they’re probably looking it up on qiita.com/ which is the (more popular) Japanese knock-off of stackoverflow.
My point is that it is percentages that are being tracked here. Do you think it’s likely that they look up how to exit Vim in their native language, but ask all their other Vim questions on Stack Overflow?
Exactly. This post on Baidu has been saved over two million times… ”
The page doesn’t show how many times it is viewed, if what you mean by 2 million is this part “贴子：2,233,227”, it is actually the total number of topics in Linux group (group in Baidu tieba is like subreddit in reddit)
OK, but that’s still 2 mil looking for Linux info in a Chinese language forum, implying that we can’t assume the fact that less people access stackoverflow from China implies they don’t need help.
That’s right, I agree with your point 🙂
Ahaha. Totally amusing!
I was once ViM love, but now I am more to Emacs.
One does not simply use a Lord Of The Rings meme to advertise Vim…
1) This shows the rapid rise in the entry of uni grads who only learned to code on virtual machines. In the years on the left side of your time series graph, there were more hard code types in the profession.
2) How can I use the alternative editor which switches to a help screen when I hit backspace?
I agree with your original assertion; the poor person didn’t meant or want to be in vi, but there they are. It’s time to go get the O’Reilly vi pocket-sized book and sleep with it under their pillows a few nights.
Oh, so funny
How do people know they’re in the Vim editor and not, say, ed? (I mean, I know how I know, but how do people know to type “vim” into Google?)
To the author: is the “Exit Vim / Total Vim” ratio conditional on visiting the Exit Vim page?
Thanks to Spolsky for tweeting this article!
Can you show statistics of Ruby programmers from Japan, if possible excluding expats (those whose web browsers prefer English perhaps?)?
Because if Japanese people are good at vim, and if programmers of Ruby (which was created in Japan) are good at vim, then I hypothesise that combining those two categories would show a group that’s really good at vim.
I’m working in Japan for years.
As for as I can tell, most of my Japanese fellows use sublime rather than vim.
Only a few of them mastered vim.
Some of them even don’t use vim plugins.
As my fellows prefer to google in Japanese, there’ll be less possibility for them to resort to stackoverflow.
Besides, there is a Japanese website somewhat like stackoverflow called Qiita.
Damn it Canada we can do better!
I feel like it would’ve been a nice touch to include how to exit vim from this page. I managed to open it with vim somehow and can’t use the links, and so I’m still stuck in vim. Send help.
Can’t use the links? Oh, well. Go into “normal” mode (which is not normal for newbie Vim users) by hitting Escape. Next, type the cutesie emoticon :q! (I assume you don’t want to save changes.)
“The cutesie emoticon :q! “.
Fantastic. Now I’ll never again forget how to quit vim! Damn… just a memory trick would do it… if that were in the original answer, we’d probably have another few years to go in reaching 1m views. 😉
Looks like someone sticking out his tongue, and then getting smacked with a baseball bat as a result. (Which is a great depiction of the sort of person who uses vim regularly, so that works pretty well.)
It seems there are still not enough vim developers in Japan and China. Maybe the vim development should come out with an improved support of Far East languages.
I see a whole audience of pimple-faced, self-serving, one-ups-manship Linux geeks out there who are so protective of their fiefdoms that all they can do is ridicule the uninformed in the hopes of scaring them away … thus preserving the mystery of the holy grail of software engin-erring. Yes, developing software is more about
Despite your lack of ability to form thoughts into a single coherent comment instead of 3… I agree. The fact that vim is still the preferred editor of choice is maddening. (give me Nano any day)
That is what happened to Nokia and Symbian. The development of Symbian software was a real pain in the ass, but they thought this was good because this meant that only “real programmers” were able to develop software for Symbian devices.
If it was easy anyone could do it, they would have not felt so special.
Unsurprisingly, the moment they got some viable alternative almost everyone was ready to jump ship.
Microsoft killed Nokia by installing their proxy as Nokia CEO. Nokia was developing a MeGo operating system to replace Symbian before the new CEO killed it and proceeded to bankrupt the company.
I was working at Nokia in software development at the time.
The culture especially towards Symbian was totally weird.
The language was utter crap, with peculiarities that were there just to circumvent bugs in an IDE from the year 1996, but they worshipped it like it was good *because* it was crap.
I was told countless different times, by many different people things like:
“People who are not good enough developers to enjoy Symbian, should not work here.”
“We don’t need to make this easier, because this way only people who really know how to write code work here.”
They even asked a developer I know to remove features from the library he had written that made sure all the necessary memory gets released, because “If somebody doesn’t remember to release all the memory, he is not good enough developer to work here.”
This all ran counter to common sense. The more developers, the more software, the more users and the more viable ecosystem.
Yeah, I know how to exit vim, so BACK OFF, MAN, I’m a scientist.
erring and less about everything else.
Try: man vim
Great plan. Propose a way to figure out how to do that while you’re already in vim? Note the “figuring out” part… how would you get to a place you could “man” it if you’re already IN VIM and can’t escape?
hit the k button lol
Open another terminal?
Come on. How can you google something if you are stuck in VIM?
Smartphone? Your peers/partners laptop? Endless possibilities…
:! firefox http://lmgtfy.com/?q=how+to+exit+fim &
Yeah, god forbid you open another terminal to figure out three answer to your question.
“I wrote man vim, but it shows inside the editor and nothing happens.”
That is a blatant lie! You’re in command-mode, so it will try to mark, and eventually, the v will put you in visual select mode…
vim is strong in you
But then you’d get stuck in man.
I just reboot my computer. Works every time.
LOL, That’s clever.
This is only the first step. Then you need to switch to emacs.
exiting emacs is even harder lol.
+ the combo you enter every time to end a process…
Not when inside Emacs.
Thank you so much! It works. I have been stucked for a whole day.
That was funny :))
How can we conclude “In contrast, in China, Korea and Japan the fraction going to this question is one-tenth as much.” ?
Probably they don’t use vim as high as other countries, hence the low traffic. Or did I miss something?
It’s as a % of all Vim-related visits, so it would take that into account.
It’s the speaking language that makes difference, plus, people in China can not visit StackOverflow easily without a proxy.
They can without a proxy.
Source: I’m a guy sitting in China right now without a Proxy/VPN.
Thanks for confirming.
Well, I didn’t say it’s totally impossible, in some area it has very high latency and drop rate when accessing a site in US, this makes StackOverflow very difficult to use. When you rely heavily on StackOverflow or Google, you have to use a proxy to make yourself happy.
Disclaimer: I’m a guy sitting in China using a Proxy
Out of all the people from each country visiting questions tagged with Vim, this is what percentage visited this questions specifically.
They just quite often don’t Google in English, and they use other websites such as http://qiita.com/ in Japan.
There is no “v” in Korean.
Now I get it tombh, why you made this novim-mode 😀
I literally access this question every single time I forgot “export VISUAL = nano” before crontab or so… Every time I somehow get into vi or vim I have to read it in order to be able to exit it.
Like with any program on *nix, C-c can stop a program.
In VIm, there is a message in the status line at the bottom saying: “Type :quit to exit”
How is that difficult?
Have you seen the quality of developers today?
I have. I’ve had been making presentations about tesing frameworks and deployment tools to a few experianced developers and got stunned a couple of times. Though my favourite is:
A developer wanted to quit a console script and he hit Ctrl + Z, Ctrl + X, Ctrl + C – in this exact order.
– Me: “What did you do?!”
– D: “Exited script.” – responded with professional face as he would teach a kid
– Me: “But why did you do all of those combinations?”
– D: “I never remember which one is it so I hit them all”
I just couldn’t find my words to explain him that he moved script to background and killed prompt for few minutes.
That does not work when you are in edit mode… You need to know how to get out of edit mode before that works…
Nah.. C-c will take you out to command-mode. So a frantic C-c pressing would do the trick… Show of hands of people that always press C-c or C-[ (aka ) just once…. 😉
I tested this. That message is not shown in Insert mode. Apparently, the OP did something else before typing it.
C-c works like escape so you’ll be back into normal mode.
Of course a second C-c will then display the message for quitting.
But C-c is something we do more than once when we want to stop something no? 😉
you wrote :quit in the object body and vim didn’t exits.
then you read -> type :quit and it doesn’t exits.
then you read again and type :q! and you’re totally amazed that this has actually worked…
I think you meant “export VISUAL=nano”. Those extra spaces will give you “bash: export: `=’: not a valid identifier”. BTW, you can set it permanently with “vim ~/.bashrc” 😀
You really shouldn’t be proud of boastful of what an idiot you are.
What is VIM?
A text editor available in *nix/Linux distros.
It’s available for Windows users, too
It’s a soap in India. You get solid bar and gel variants. It’s difficult to quit once you start using it.
Power of 100 Lemons!
If there are 100 lemons why did they draw a lime ?…
BABY DONT HURT ME
Don’t hurt me…
no more …
In Spain we have another soap lol
This is more worrying than anything else.
I need “stack overflow helping one billion developers exit `nano`”
Exiting nano is way easier, it’s usually displayed in the bottem of the screen how to do it.
so does vim! and yet…
Nano doesn’t have different modes for inserts or commands ¯_(ツ)_/¯
I think it is unfair to make representation by programming technology without taking into account the popularity of technology. Maybe C is so low only because not so many people use it comparing to jquery?
The representation shows the percent of the Exit vim question among all vim questions within a technology. In other words, how often C/jquery programmers are stuck in vim compared to how often C/jquery programmers are interested in vim. Thus, the technology popularity does not affect the results here, at least directly.
Once I exited vim with ‘:X’, which in that version meant “crypt the file”. Obviously, I gave an unknown key to crypt typing randomly on the keyboard trying to exit that editor.
You’re always could send $300 to bitcoin wallet 115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn and wait for your decryption key back…
In the first graph, why is the X-axis titled “Month” but labelled in years? Did you accidentally exit VIM before changing the title?
Because the datapoints represent months.
🤣 Keys: :q!
Mnemonic: “ESCape this COLON thing, qUIT and do NOT! RETurn”
Is there another mnemonic to remember which letters to take from this mnemonic and which not? 🙂
Click through to the link, maybe his Usenet ASCII layout is more helpful than the one-liner I typed.
It’s been a useful mnemonic for 24 years.
In another comment I was given the mnemonic, “cutesie emoticon”. Or perhaps, “quitsie emoticon” instead. :q! – it’s an emoticon, ain’t it? 😉
I’m a Ukrainian and I know how to exit VIM.
I’m ukrainian PL/SQL developer, working with IDE and i know how to quit Vi, ViM. By the way, how to quit Nano?!
At least with nano the instructions for quitting are always right there in the lower left!
Unless you are on a mac and type alt-x accidentally which just hides the help!
Ctrl + X
Or better still, how to search/copy/paste/delete/page in nano. For exiting, there’s always a helper down below.
I’m from Crimea and I know how to exit from Ukraine.
Is Crimea still part of the Ukraine at all?
By national and international law, yes. In practice, no.
Glad to hear yes, sad to hear no.
Not sad at all. Just visit Crimea.
Being an alcoholic is also not sad at all! Just visit such a clinic. 🙂
Can you exit alcohol?
I tried to scream “exit” and “quit” but the only result was neighbors calling the police…
What am I doing wrong?
In Soviet Russia, alcohol exits you – not you exit alcohol!
So in your opinion people living in the Crimea are kind of alcoholics? Nice (not at all). (:
In my opinion, people who are propaganda-holics are kind of alcoholics.
I don’t know if something is “sad at all” in Crimea, but anyhow, that doesn’t have any relation to the crime committed.
You wanna restore some kind of “historical justice” – go give it back to Turkey 😉
…or wait, maybe even Greece?! o_O
It’s temporally occupied by Russia and isolated from the world.
It is more likely it was temporary given to Ukraine in the middle fifties by Russia and they got back to Russia by their own will when the democratically elected Ukrainian president was ousted by violent means, what it is usually called a “coup d’etat” in other contexts, and one of the first laws the coup government tried to pass was to ban Russian language use from Ukraine, being most of Crimeans by far Russian speakers the outcome shouldn’t surprise anyone with at least one functional neuron within its skull…
Wet kassabian dreams, cotton boy 😉
You can lie as much as you want but your lie can’t change reality.
Go suck a dick of your dictator as you like.
Keep your tales for International Court in Hague, cotton boy.
> democratically elected Ukrainian president
Yanukuvich was not a democratically elected president. He usurpated power contrary to the Constitution. He got an impeachment by democratically elected Parliament.
> one of the first laws the coup government tried to pass was to ban Russian language
this was never happened. You are liar.
Any way, Russia occupied the Crimea by military forces and broke all international laws, so, you tales mean nothing.
Yep, it is still a part of Ukraine.
The same as Sudetenland is the part of Czech Republic.
Savage for a morning comment.
actually not 😀
It is your choice. Nothing more.
I’m from Vim and i know how to exit Emacs
That escalated quickly
When you’re exiting from UA – you accidentally exit from the “common sence”.
No, you don’t 😀
Well, I bet you learned thru stackoverflow xD
I learned how to do it long before StackOverflow came into existence ;D
Odin, is it you?
I’m a Chechenec and i love Chech-nya
I am Russian, and I love her-nya!
Also, just use ed(1) where :q is just a mere “q”.
ed is the standard text editor!
OMG this gets funnier if I see it again and again.. lol
What’s this… I don’t get it. Could someone explain? ty!
this comment should be upvoted by 1 million people that got complicated to close Vim :v
`for vimpid in $(ps ex | grep vim | cut -d ‘ ‘ -f1); do kill $vimpid; done; echo ‘no problem’`
or more efficiently: kill -9 $(pgrep vim)
more safely, too, since you won’t send kill signals to any process that has vim in any substring of its command name or arguments
unless you are on solaris…
I can’t be the only person who uses a distro which has killall.
Or pkill , these are probably the same people asking how to exit vim.
Jesus Christ…. the shame. I saw the overly convoluted loop, replaced ps | grep with pgrep, but didn’t even think of pkill.
killall -9 vim
Wow. Did not realize vim was hard. gg devs, gg.
well you have to learn it SOMEWHERE, so.. what’s your point? that’s a very basic question, and VIM isn’t exactly intuitive to use for a newcomer
i first came across it when using git bash and the natural response was to google the answer
I suppose that’s true. Back when I was learning to use linux, it was drilled into me to man anything new before using it, so I actually read the manpage for vi/vim. I think my surprise was more focused on the idea that someone would run random linux commands, blindly, without knowing how they work.
That’s systems/devops vs pure devs though. Cheers!
Most noobs don’t start vim on purpose, but it is set up on their system as the default editor for some CLI commands (git etc).
I suppose this was written in the post though. RTFP. Cheers!
Andras you’re absolutely right. I apologize for laughing at “IT experts” who can’t use a text editor without google.
No, there’s no excuse for “pure devs” not to know something this basic and be familiar with reading man pages. Too many devs these days are idiots stuck in proprietary Windows/Mac land.
:O .. I’m working in Vim partially and love it .. on Mac … and Linux servers too … 😀 not all Mac users are Vim haters 😉
Someone explain me this
Its like saying you dont have to debug code if you dont write code
“you don’t write code”
I’m an f-e dev and I bet I write a lot more code than you.
It’s most likely to webdesigners SAYING they have knowledge in angular but don’t.
What about develop an api-based system in angular, and THEN express your opinion?
typing git commit from the cmd line opens vim, no matter what code you are writing, so this meme doesnt make any sense
because you never commit anything because your code sucks – is that what you’re implying here?
because angular devs dont code? is that what you’re trying to say here?
Maybe because you shouldn’t be committing angularjs code in the first place, especially if you can’t push a commit without opening an editor (git commit -m ‘my message’ && git push)
Which OS are you using? In Linux at least you can replace vim with other editor just by setting the EDITOR environment variable.
I have a feeling that the tag graph would be similar to most popular tag graph overall…not sure it points to which developers are more likely to get stuck
To clarify: the tag shows the amount of traffic to that question divided by the total Vim traffic among those users. This, it’s not saying “7% of people stuck in Vim use JQuery,” it’s saying something closer to “7% of people that use JQuery get stuck.”
Thanks for clarifying!
Here’s a book that might help:
If the UI instruction for how to perform a task does not adequately explain how to perform that task, the UI is bad.
How about you stop joking & cut to the chase?
Hilarious. If only they’d been using emacs.
But then they would ask why ‘git commit -a’ is so slow compared to their previous git commands …
Just use Emacs. Let the holy wars begin!
That Holy Wars started decades ago and never ended. They just seem to have signed an armistice…
Emacs has a built-in vim-mode. So you can exit Emacs as “easily” as Vim using ZZ instead of CTRL-X CTRL-C 🙂
People used to say “Emacs is a great operating system, lacking only a decent editor”. With Vim-mode this is n’t true anymore.
Vim rules 😉
I used Vim for almost 2 years, but then I found out how to exit.
Proud that my C/C++ colleagues are least likely to consider this a problem! (Well, apart from Rubyists – who’d’a thunk that?)
“(Well, apart from Rubyists – who’d’a thunk that?)” – definetly not those who use jquery.
It’s the artisanal vim users.
When I type “:q” it just says “E488: Trailing characters”
Still stuck… :o(
Try typing :Q with caps, maybe your computer is deaf…
If it really is deaf you should try :Q!
Don’t literally type out the “” part. You have to type “:q” and then press the enter key.
I used Vim for almost 2 years, but then I found out how to exit.
I don’t get the context what means exit vim ? Means switching to other text editor or IDE?
No, it means how to quit the program, shutdown it
going back to the terminal
I see what you did there.
This is good reason to use nano, just press Ctrl+x. Logical.
I love nano! I’m a native Windows dev, and in my Raspberry Pi tutorials I suggest using nano since people new to Linux might find VIM intimidating… Ctrl-X to exit, Ctrl-O to save. DONE.
well, it is subjective .. :wq for example, much more meaningful for me … Vim is a great tool … just need to catch an idea and you will appreciate it
I uninstall nano whenever I’m a new system. Just take the time to learn Vim. You won’t regret it.
This is so embarrassing for the state of our industry. We have too many so-called “developers” that have never used a real operating system in their life, and have no clue how to administer one. They have to rely entirely on others to do it for them. Vi has been around since the 70s—this should be computing 101. Stop being coddled by your GUIs, people!
Hey everyone, I found the guy that’s done everything from scratch, doesn’t use other people’s software, and has never asked for help ever.
Everyone knows that is the Temple OS guy 🙂
People like you were why I was always afraid to ask any questions or join any group related to tech. Your pretentiousness is poison.
hop off hardo programming bro
Hmm… No. Every programmer starts out as a beginner, and beginners get tripped up on exiting vim.
But you *did* identify a big problem in our industry: people like you.
What’s embarrassing is people like you who talk down to people who know less than you. Get off your high horse, everyone was a beginner once.
The embarrassment is that an antiquated program written in the 70s is still being used as a default editor on so many systems. It should have been superseded decades ago. Just because you learned how to use it doesn’t mean the next generation of developers are required to as well.
Why should it be superseded? Just because you don’t know how to use it?
It should be superseded for the same reason we no longer use FORTRAN to write new software. Better tools get developed and older tools need to be abandoned.
Have you ever considered that there’s just no better alternatives to it? Or you’re judging just on how old the thing is? Better tools will always supersed worse ones, that’s true. But it won’t happen until *there is* a better one. Vim is a genius thing and I doubt there will be something better anytime soon.
haha, I think people who use emacs and nano would beg to differ.
Just so you know, emacs was created in 70s too. Surprise huh? GNU nano is younger but it’s still 17 years old. I agree that emacs is on the same level as vim and nano, I use nano along vim every day. But that is just comfirming my words: it doesn’t matter how old the tool is, it still can be the best alternative even after 40 years
I’m a (fairly casual) Emacs user, but I will jump into vi/vim in a heartbeat to edit a config file or a shell script. Once you learn the two modes and the dozen or so basic commands, there’s nothing quicker and easier on the server side.
I learned to program with punch cards. I made a job deck, and submitted it to the operator, and found my deck with the printout rubber banded around it in a cubbyhole a few hours later. We were careful with our typing. We had huge incentives to get it all correct the first time.
I am not nostalgic for those days. I like text editors. I like IDEs, too.
As a person who does DevOps, this doesn’t bother me in the slightest. If a developer is really great at writing code and has zero idea how to log into the servers said code actually runs on, it makes my life easier. Overspecializing may breed in weakness, but in larger organizations it’s actually a strength.
I cannot seriously regard people who use vi/vim in 2017 for reasons other than unavoidable necessity.
well, it is not the only editor … but when you ssh to the remote server and need some editing … or just don’t want to switch from the console … do some batch editing (hello repeatable combinations, record macro etc.) it is one of the best tools … no place for GUI here … world is not only about IDE 🙂
I cannot seriously regard people who ignore the potential efficiency benefits of using a tool like Vim, even in 2017.
I have worked with all kinds of editors and IDEs along the years (been programming since the 90s) and I have finally settled on vim as the most practical solution. Wherever I am I can just ssh into my dev environment and start up vim. I’m not tied to a particular OS, not tied to using my own computer, not tied to anything. All I need is an internet connection and a keyboard and I can jump straight into my work. Nothing can beat that.
I’m not sure why you think being an ignorant bigot is something to be proud of.
I’m not sure why hammer-forging a crowbar into a screwdriver instead of using an actual screwdriver is something to be proud of.
Then you’ve never used vim with plugins and written code without an IDE, you sweet summer child. It’s okay, you don’t need to understand the ways of the old ones. One day our tools will fade into memory and obscurity and you will be left with the broken half-implemented shadows of what our tools once were.
Stackoverflow should create a page for ‘Hall of Legendary Question in Stack Overflow’,
because, case like this is truly an irony, from this case we know that people like to learn something not from the basic thing or the fundamental thing, but they learn it from the middle level of those lesson.
Hopefully, this case can be a lesson for other developer.
Yes, im from Indonesia. But i know how to quit Vim. Press :q enter
no, if you already typed something in the file
I seem to be the only one I know who exits vim using 😡 enter
It is a shortcut for :wq enter, that is write file and then exit.
Anyone else using that command?
Cool! You just saved my planet! 😀
OH. MY. GOD.
I’m more partial to ZZ. I’ve tried :x, but I’m just not a 😡 kind of guy, I guess.
It’s not a shorcut to :wq. 😡 will not write the file if it was not modified. :wq will write the file inconditionaly
Let us not forget the System Administrators, the Operators, the DevOpsors!
Being familiar, nay comfortable! with vi and Vim is indispensable when your infrastructure depends on Unix & friends. Hosts, containers, logs, configuration, troubleshooting, and on and on.
A “computing day” does not go by where vi cannot save your neck as the one responsible for production.
I am doubtful that in the heat of an outage, that Sublime Text, Atom, VSCode, IntelliJ, or Eclipse are going to be of any utility.
You could still use emacs, though. I’ve never warmed up to vi. And now I just use nano most of the time.
Actually I don’t believe China is ranked last means Chinese programmers are most familiar with VIM. The reason why China’s percentage is so low maybe come from these two: At first, most of the traffic leading to stackoverflow is from Google, but Google is banned by government in China. Secondly, the community of Chinese-speaking programmers is large enough that they prefer search for answers internally, using Chinese on Baidu.
Now there is GVIM for gnome and xfce.
Yet again the data scientists pulling information no one gives a sh** about.
Why do you list China and Taiwan separately in the figure: % of vim traffic going to “How to exit vim”? You should correct it immediately and publish an apology.This is a serious mistake.
I love the quote “I’ve been told by experienced Vim users that this reputation is unfair.” When a million people post a question asking how to exit an application, I think it’s fair to conclude that the application has a major usability problem.
It would be better if it were at least as hard to open Vim as it is to close it – this would help prevent more people from being sucked into the Vim asylum.
awesome thanks for share this post.
> In contrast, in China, Korea and Japan the fraction going to this question is one-tenth as much. That might indicate that when developers in these countries enter Vim, they usually meant to do so, and they know how to get out of it.
English is hard for East Asian country people, if a native-CJK user is capable of researching his/her problem using English on SO, he/she is probably some kind of advanced users, so “exiting VIM” is less likely to be searched on SO using English for these users. Most Chinese users who stuck at VIM would just search “如何退出VI？” in Baidu.com.
wonderful put up, very informative. I wonder why the other specialists of this
sector do not notice this. You must continue your writing.
I’m sure, you’ve a great readers’ base already!
For easy reference, https://howtoquitvim.com/ is now a thing.
awesome thanks for share this post. I cannot seriously regard people who ignore the potential efficiency benefits of using a tool like Vim, even in 2017.
These comments show a variety of stereotypes.
Yeah no duh some countries seem to be able to exit vim easier. Probably because some countries don’t USE stack overflow as much (IE China). lol just my opinion.
GTFO, Vim is AWESOME!