Live data from Hacker News

Helping a Million Developers Exit Vim

stackoverflow.blog

441–450 of 489 posts

Re: Helping a Million Developers Exit Vim

#441

Earlier quoted context omitted.

I have written hundred+ line awk programs. For stream text editing it is excellent at what it does and it's install base is huge. Rarely do I encounter a *nix machine without it on there.

> Rarely do I encounter a nix machine without it on there. Isn't it posix mandated?

yjftsjthsd-h, I'm curious so I looked it up but couldn't find anything. AFAIK POSIX only specifies operating system behavior and doesn't specify any actual apps but I could be wrong there. In any case, the rise of containerization has brought many nano Linux distributions that often have even fewer packages than even the most minimal distributions of years past.

Re: Helping a Million Developers Exit Vim

#442

I met my wife because she was stuck in VI. I was a unix sysadmin in the early 90s, and she was a grad student. She came to me for help (like most of the 1st years did) because she couldn't get out of vi. However, to be fair, this was not her fault per-say. She actually knew how to use vi, but just couldn't find the ESC key. Does anybody remember the DEC keyboards where there was no traditional ESC key, but it was F11…

And this does not happen anymore, thanks to google and stackoverflow. No need to ask anyone when you can just google the answer.

the next generation are doomed to live their lives alone.

oh wait, they have tinder

Re: Helping a Million Developers Exit Vim

#443

Earlier quoted context omitted.

Best meeting story ever. I met my wife in a physics lecture, and she credits me with her sticking with engineering, but your tale is better. Important question: did she end up learning vi after that?

She already knew vi. Probably better than I did, as she'd done her undergrad at MIT, and already knew unix. But she just didn't know that F11 was ESC on those DEC keyboards. It was labelled and all, but it was nowhere near where ESC is normally on a keyboard.

I assume that ^C and ^[ are vim and not vi? Or, at the very least, later additions, I guess.

Re: Helping a Million Developers Exit Vim

#444

Earlier quoted context omitted.

Most people have no idea why vi made sense way back when (and, in my opinion, does not today). I used VT100 terminals for years on both mainframe and CP/M systems. Keyboards were not very standardized before then, the mouse did not exist and most text editors had to use all sorts of convoluted commands to allow you to do anything. http://www.vintagecomputer.net/digital/VT100/DEC_VT100_SYSBO... I ran the first version…

It is the only editing system that makes sense to me. That's because modal editing means fewer modifier-key combinations are needed, and no mouse is needed. Compare with.. any other editor, where the only thing that might save you from RSI is enabling sticky keys, and even then, if it isn't emacs you still have to heavily use a mouse. For a great number of tasks, being a vim or emacs pro means doing things faster tha…

I love vim, but I do feel that my reliance on its awesomeness has been reduced quite a bit since I switched to using a Kinesis Advantage keyboard. For one, the cursor keys don't require me to move my hands at all, so I no longer use hjkl to navigate. I also have quick easy access to all modifier keys and I use a foot pedal too. I do still use vim, but I've essentially mapped all of the fancier features to pedal+main keybaord single button shortcuts - Kinesis Advantage macros also means it works fine in a stock vim.

Yes, yes, when I don't have my keyboard, I still use the normal vim features, but I try to use the keyboard as much as possible for anti-RSI purposes anyway, so its not a big deal.

Re: Helping a Million Developers Exit Vim

#445

Earlier quoted context omitted.

Why doesn't it make sense today?

To expand on rebootthesystem's excellent answers: * Ease of learning. Any power user learning Vim now (or in the last 20+ years) is coming to it with a headful of useful, versatile conventions and shortcuts that completely don't work. God knows how many times I interrupted my flow by reflexively hitting Ctrl-Z to undo, or Ctrl-V to paste, or Shift-Arrow to highlight, or, hell, just trying to type something normally.…

Spacemacs solves the problem of discoverability by displaying all modal keybindings currently available, if you started typing a modal command sequence, but haven't completed a command yet. The additional bonus here is that once you internalise these commands, they stay the same while you execute them much faster. In mouse-centered environments, one would first learn how to do an action using a mouse and after he felt the need to be faster, he'd need to learn the key combo from scratch (for the sake of the argument, let's ignore the few common conventions like F1, cut/copy/paste and undo/redo).

On the other hand, I agree that starting out with CLI is a bit painful. IMO, the middle ground taken by Spacemacs really should be researched (and used) mode.

Re: Helping a Million Developers Exit Vim

#446

Earlier quoted context omitted.

Those are slower. ZQ is three keypresses. :q is four keypresses.

The people trying to get out of Vim probably don't care about having to press one extra key to escape it.

Right, but if it is the first thing they learn most will stick with it for the rest of their life. We should teach them the most efficient way first.

In my experience almost all of my colleagues over the past 5 years only new of :q, not ZQ.

Re: Helping a Million Developers Exit Vim

#447

Earlier quoted context omitted.

Hmm. MIDI foot controller -> USB MIDI interface -> computer -> driver -> user space scriptology ... What do you think? That would easily give you ten pedals. I use a 1993 vintage ART Ultrafoot X-15 I got off Craigslist --- for my guitar rig, not a text editor. :) https://www.google.ca/search?q=ART+Ultrafoot+x-15&tbm=isch

Why not just play the piano for programming?

A MIDI foot controller isn't a musical keyboard (though such things do exist, mimicing organ pedals). It's used for MIDI program changes. I have a MIDI programmable guitar pre-amp, and so in combination with this pedal, I have access to various amp settings just by stepping on various buttons.

Re: Helping a Million Developers Exit Vim

#448

Earlier quoted context omitted.

Why doesn't it make sense today?

In all of the discussions on HN about vi/m this is probably the most intelligent question I've received after posting my opinion. I've been coding for 16 hours straight and have at least another four in front of me (have to deliver tomorrow AM) so I don't have a ton of time to answer this. I'll use today as my example of how irrelevant (and counterproductive) vi/m can be. I'm working on a large Django project and cra…

> A lot of the vim "religion" centers around keeping your hands on the keyboard, not using the mouse, carpal tunnel and speed.

That's a nice side effect, but it's not why vim is "better".

"Normal mode" in vim ties composeable​ functions each to a separate key. The "." key repeats the most recent function. You can record a string of keystrokes to a macro, and even edit it as plain text.

Vim is fantastic for editing text, which is 99% of what most of us do. It may not be your first choice for creation (although it is mine), but that doesn't make it worthless.

Re: Helping a Million Developers Exit Vim

#449

Earlier quoted context omitted.

Except, if you hit Ctrl+C, you don't have to hit ESC. You literally type what it tells you and it works. The only way the above would work as suggested is if the person hit an insert mode key first after having typed Ctrl+C.

Weelll. The problem is that the "quit" command has an insert mode key in it. So it's quite possible to get stuck like a poster above says- enter macro recording, then insert mode, then write the letter "t". On the other hand that only happens if you type "quit" without the colon and the message makes it very clear that the colon is part of the text you must enter: Type :quit to exit Vim See all that whitespace? It's…

See all that whitespace? It's very hard to think the colon goes to the "Type" bit.

Except, logically, why would they bother to specially call out , a whitespace character, but not the spaces as well if they intended the user to type them?

I can't think of any obvious, safe way to display text that a user should type that isn't subject to possible misinterpretation in the single line of output available.

Re: Helping a Million Developers Exit Vim

#450

Earlier quoted context omitted.

In all of the discussions on HN about vi/m this is probably the most intelligent question I've received after posting my opinion. I've been coding for 16 hours straight and have at least another four in front of me (have to deliver tomorrow AM) so I don't have a ton of time to answer this. I'll use today as my example of how irrelevant (and counterproductive) vi/m can be. I'm working on a large Django project and cra…

> A lot of the vim "religion" centers around keeping your hands on the keyboard, not using the mouse, carpal tunnel and speed. That's a nice side effect, but it's not why vim is "better". "Normal mode" in vim ties composeable​ functions each to a separate key. The "." key repeats the most recent function. You can record a string of keystrokes to a macro, and even edit it as plain text. Vim is fantastic for editing te…

Editing text is maybe 9% of what I do. Most of my work consists of reading text, thinking about it, running tests, reading the results of those tests, thinking about what I've read, discussing what I've been thinking about with coworkers, reading more text, and thinking some more. It has been this way for most of my career. This is what I see most of my coworkers doing, too. Editing text more efficiently simply wouldn't make any measurable difference in my productivity, because editing text doesn't take up that much time to begin with.
Post reply on HN