Live data from Hacker News

Helping a Million Developers Exit Vim

stackoverflow.blog

481–489 of 489 posts

Re: Helping a Million Developers Exit Vim

#481
post #197

Earlier quoted context omitted.

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.

Right. Many programs react to an unset EDITOR variable by assuming vi though. This makes sense, of course, as virtually all systems are going to have some implementation of vi installed. Even the almighty ed tends to be missing from the default install of some recent Linux distributions.

Only if they have wrongly conflated EDITOR and VISUAL.

Re: Helping a Million Developers Exit Vim

#482

Earlier quoted context omitted.

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

Here's the problem: Ctrl-C isn't quit. It's keyboard interrupt, and that does not necessarily mean "quit".

Ironically, in vim, where the terminal is in non-canonical input mode when vim is in the foreground, it is not keyboard interrupt. (Nor is it in most modern shells, which also use non-canonical input mode in their command line editing mechanisms.)

Re: Helping a Million Developers Exit Vim

#483

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.

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

Actually, no. vim runs with the terminal in non-canonical input mode. Control+Z results in a SUB character being sent to vim. vim, in turn, knows to suspend itself when it receives that character (in visual or normal mode).

Re: Helping a Million Developers Exit Vim

#484
It's interesting to observe that I am the only person to have spoken up about alarm bells going off when it got to the part about Ukraine being the place that visits the Stack Overflow WWW page the most. No-one in this discussion, or in other discussions that I have read, has yet said:

> Hold on a minute! This is a WWW page in English, and yet you have the Ukraine, Turkey, Indonesia, and Pakistan as the top four countries by visitor? And the highest placed majority anglophone country is Canada, in sixteenth place? Hold your horses! Something is not right, here.

I have seen this pattern myself, on one of my WWW servers. Ukraine and the Russian Federation are second and third on the list ... for HTTP. For HTTPS. however, it is a very different story.

On the basis of my own experience, I question the accuracy of the statistics posted, and the accuracy of the conclusions based upon those statistics.

Re: Helping a Million Developers Exit Vim

#485

Earlier quoted context omitted.

> It's silly, really. Take the entirety of a project and multiply typing time by, I don't know, 1.25. It would still be insignificant when compared to the overall project time. I mostly agree with you, but I think there is value in fast text editing for software development. The advantage of being able to edit code quickly is that typing doesn't interrupt your train of thought as much.

If someone's train of thought is interrupted by the difference in code entry time between vim and a good IDE or code editor --which is milliseconds-- they have a real problem requiring medical attention. Forget IDE's for a moment. Look at an editor like Atom. It's fantastic. You type "for" and it expands the for loop automatically for you and it understands languages. And, more importantly, you have to spend exactly…

I get the impression that you haven't gotten proficient in an editor like Vim or Emacs. The difference in speed in terms of getting your thoughts out of your head into the computer is definitely more than milliseconds. I usually use Emacs, but I use an IDE for Java, because I think the benefits outweigh the costs, which is why I said I mostly agree with you. What I find frustrating is that there's no reason an IDE couldn't be as good as Vim or Emacs for editing text while retaining all of their IDE goodness.

On of these days I may try my hand at building something like that (assuming nobody beats me to it, which would be even better).

Re: Helping a Million Developers Exit Vim

#486

Earlier quoted context omitted.

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

I guess one of my plugins steals ^Z; maybe evil-mode itself.

Re: Helping a Million Developers Exit Vim

#488
post #476

Earlier quoted context omitted.

Didn't Ms"S use to use CTRL-Ins or similar?

The name that you want to look up is Common User Access.

Well TIL, thanks! Interesting to know the history.

(I still have a few Windows apps we use at work that use these standards; good to know they actually were a standard.)

Post reply on HN