Live data from Hacker News

Helping a Million Developers Exit Vim

stackoverflow.blog

291–300 of 489 posts

Re: Helping a Million Developers Exit Vim

#291

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.

In both cases, the program doesn't know what you're trying to do. It knows what you're probably trying to do. That's not enough.

In both cases, this is because there's a race condition:

If you run a command and decide you want to kill it, you use ctrl-c. If the command finishes between you deciding to kill the command and the signal being sent, the "container" process (vim or python) receives the ctrl-c. If it always assumes "what you want" is to exit, you've maybe lost work - edits made or variables populated. Avoiding that is definitely the right call!

Re: Helping a Million Developers Exit Vim

#292

Earlier quoted context omitted.

So much whining on this thread... Want to quit vim? How's about: 1- Hit ctrl-z 2- Type "kill -9 %" 3- Hit enter Result: dead vim. Heck, dead anything that was previously on the foreground. This works with emacs, vi, nano, and, I guess pretty much everything, since ctrl-z is captured by the shell and never gets sent to the application (I think).

No, applications can and do trap either ^z or the signal it generates (not sure which). I'm a vi user [0] but I'm pretty sure emacs requires ^z^z to STOP. [0] autocorrect lol of the day: "I'm a vi[rgin]"

emacs stops on a single ^z. You can trap it based on SIGTSTP though (Terminal SToP, a distinct signal from SIGSTOP, which I don't think can be trapped).

Re: Helping a Million Developers Exit Vim

#294

(Attribution is questionable, but as a geezer I feel the need to make sure the younger generations at least are familiar with this:) ed is the standard text editor Let's look at a typical novice's session with the mighty ed: golem> ed ? help ? ? ? quit ? exit ? bye ? hello? ? eat flaming death ? ^C ? ^C ? ^D ? --- Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet pruden…

I love ed

Re: Helping a Million Developers Exit Vim

#295
Reading title I thought that it will be about helping people switch to a different text editor. One that is not an improved version of a text editor from 70s.

I am a vim user, but I want to switch to something different. I mainly use it now, because of inertia. Don't bother with replying how editing model of vim is still relevant today. Or how one should think about vim as a language - a verb and a motion. I know all those arguments and I even agree with them to some extent. However I would argue that vim's interface is quite taxing for the mind - at least for my mind. Editing may be efficient, but I read more code then I edit.

Re: Helping a Million Developers Exit Vim

#297

Earlier quoted context omitted.

> 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 appea…

Humane programming is something I wish compiler and language builders would do more of

Approximately 50% of the contributors in this thread argue actively against it, so I wouldn't hold my breath ;)

Re: Helping a Million Developers Exit Vim

#300
post #224
post #171

I spent almost 10 years doing IT for a company whose backend was based entirely on as/400. If you've ever used a system like that, I'm sure you know where this is going... The console's that the front-desk or clerical users used every day had a steep learning curve. It was something that you would definitely not be able to walk up to and just intuit. However , once you figured it out, there is never going to be a fas…

There's certainly a trade-off between learning curve and long-term productivity. But the problem here is that vi/m gives shitty feedback, that's all. It should say "Press and type :quit to quit VIM" but it doesn't. Most first-time users lack a mental model of input modes, so they get stuck.

After pressing Ctrl-C a few times, the status bar says 'Type :quit to exit Vim' for me. Not sure what else people try to exit vim.
Post reply on HN