Live data from Hacker News

Helping a Million Developers Exit Vim

stackoverflow.blog

101–110 of 489 posts

Re: Helping a Million Developers Exit Vim

#101
post #3

Obviously my personal bias, but it's emacs I can never remember how to exit from.

Emacs is definitely difficult to exit from. The difference is emacs usually isn't the default/fallback EDITOR on the system, so you rarely get dropped into it unknowingly/unexpectedly.

Re: Helping a Million Developers Exit Vim

#102

Earlier quoted context omitted.

Hitting Ctrl+C still works, it tells you to type ":quit ".

Why doesn't it just quit? That's as stupid as Python's >>> quit Use quit() or Ctrl-D (i.e. EOF) to exit The software knows perfectly well what I'm trying to do FFS.

Because it's an editor, and if it just quit on me every time I mistyped Ctrl-C just because you can't be bothered to type the right command, I would be quite angry.

Re: Helping a Million Developers Exit Vim

#103
post #12

I'm somewhat amazed but mostly amused that the Vim developers care so little about user experience that they continue to ignore that people have trouble with exiting their tool and refuse to adapt to a more expected convention for exiting it.

It literally everytime you boot the first screen tells you how to quit and get help. So..read the screen that comes up Everytime? If you try Ctrl c it tells you it's :q.

That's the point. That behavior is contrary to the expectation. Ctrl+C should not display a message: Ctrl+C should quit immediately.

Re: Helping a Million Developers Exit Vim

#104
post #85
post #55

Earlier quoted context omitted.

Cute, but no. When you enter insert mode, the "welcome screen" disappears. So if you can see the instruction telling you to type ':quit', then typing :quit will work.

FTA, https://zgab33vy595fw5zq-zippykid.netdna-ssl.com/wp-content/... It happens because people don't what they are doing. You assume that they hit ctrl+c, then immediately type :quit, but if they did, then they wouldn't be Googling it. They did something between trying to exit and quit that got them into a different mode.

Perhaps they miss the : Without it, you end up recording a macro and going into insert mode.

Re: Helping a Million Developers Exit Vim

#105
post #55
post #29

Earlier quoted context omitted.

dev: That just typed ':q' into the text area me: Hit escape first, then :q dev: Oh, then why doesn't say escape then :q me: welp

Cute, but no. When you enter insert mode, the "welcome screen" disappears. So if you can see the instruction telling you to type ':quit', then typing :quit will work.

Even if you're in insert mode, ctrl-c takes you to normal mode, then a second press will show you the hint.

Re: Helping a Million Developers Exit Vim

#106

Earlier quoted context omitted.

And worse vim is often the default EDITOR or software's fallback in case no EDITOR is set, so you get dropped into a vim edition buffer seemingly randomly.

I'm pretty sure that I've never seen any OS/Linux distribution set default EDITOR to vim. If EDITOR is set to vim, then someone must intentionally did that.

git bash on windows has vim as the default editor when editing commit messages

Re: Helping a Million Developers Exit Vim

#107
post #95

Earlier quoted context omitted.

Why doesn't it just quit? That's as stupid as Python's >>> quit Use quit() or Ctrl-D (i.e. EOF) to exit The software knows perfectly well what I'm trying to do FFS.

So it actually doesn't, it's basically just a hack around the fact that the repl is basically: while True: print(str(eval(input()))) Case in point: >>> x = str(quit) >>> x 'Use quit() or Ctrl-Z plus Return to exit' I suppose you could implement quit.__str__ as sys.exit(0), if you really wanted to avoid this problem.

> So it actually doesn't

It does, it just does not care.

> it's basically just a hack around the fact that the repl is basically:

I know what a REPL is. Here's an idea: it's not difficult to add an exit special case to the REPL.

> Case in point:

Case in point: the developers added a "help text" to tell users to go fuck themselves, knowing exactly what users wanted to do and refusing to do it. quit's repr didn't appear by magic, it was put there, knowingly, by people who understood exactly what they were doing.

Re: Helping a Million Developers Exit Vim

#108
post #25

Earlier quoted context omitted.

> 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. So the first screen doesn't help in this situation The sort of developers who get stuck in Vim are not the ones who are using it intentionally

Hitting Ctrl+C still works, it tells you to type ":quit ".

If I expect Ctrl+C to quit immediately, and it doesn't quit immediately, that is not functionality that works.

Re: Helping a Million Developers Exit Vim

#109
post #27
post #15

Earlier quoted context omitted.

Imagine you don't know that. Now try to exit vim.

Add in the bonus confusion that you may not have even been trying to run vim, and in fact may not know what it is (hey, everyone's a beginner some time), but have landed there due to a default $EDITOR value. [EDIT] also, a typical mid-level computer user's tendency to slap "ESC" when panicked. Ha!

Which OS/Linux distribution set default $EDITOR to vim? Personally I've never seen one, and I don't think vim is a sane default value for $EDITOR.

Re: Helping a Million Developers Exit Vim

#110
post #57
post #41

Earlier quoted context omitted.

Why solve a "problem" that no actual user of the software has? It's not an iphone, it isn't meant for use by the general public. Use nano if that's what you want. There's no reason to fuck up vim for people who actually use it to help the people who don't .

Many of us get dropped into vim by accident.

That's your distro's problem, not vim's. There is no reason to fuck up vim just because distros are poorly configured.
Post reply on HN