Live data from Hacker News

Helping a Million Developers Exit Vim

stackoverflow.blog

401–410 of 489 posts

Re: Helping a Million Developers Exit Vim

#401

Earlier quoted context omitted.

I just hate programs that change patterns that are standard everywhere else. E.g. 99% of software uses control+c and control+v to do copy and pasting, so of course software that maps it to something totally different is going to be very frustrating. The same thing with vim using nonstandard way of quitting. Discoverability is another problem. You can have weird keyboard commands, but make it possible to find them wit…

I hate VI not defaulting to wasd for movement like every other single piece of software I used growing up... (e.g. Quake, Marathon...) Ha ha ha. (Or should my games have used hjkl)?

As I recall, both Quake and Marathon defaulted to arrow keys for movement. Half-Life was the first time I encountered WASD out-of-the-box.

> (Or should my games have used hjkl)?

I still play a game that does...

Re: Helping a Million Developers Exit Vim

#402

> 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. I'd say no…

How is the conclusion wrong? If there is a cohort of developers in Japan that do use SO, then the statistics are still valid even if all developers in Japan don't use it.

Because the traffic is based on % of all vim visits. This means, if less Japanese visit, the share they have in the total % of all vim visits is also less.

Re: Helping a Million Developers Exit Vim

#403

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.

Re: Helping a Million Developers Exit Vim

#404

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…

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 cranking out apps like there's no tomorrow. I use PyCharm for this.

Here's a case where experts are making it their business to deliver a superior tool that allows me to get my work done. It has myriad tools configured and configurable to help me. I don't have to futz around with weird custom stuff. It is intelligent about Python, Django, JS, jQuery, databases, HTML, packages, Git, Python console, Django console, etc. It can even talk to my servers. PyCharm is, in my opinion, a nearly unmatched productivity tool.

I lied. I am working on two large Django projects simultaneously because some of the work for the new project entails porting from an old one. So, two PyCharm windows on two 24 inch monitors and two browser instances side-by-side on the third monitor.

Can you setup vim to do some/all of the above. To some extent, yes. I haven't used it at this level in quite some time so I can't answer the question. What's the question? Can you setup vim to match PyCharm feature for feature? I don't think you can, and, if you could, it'd be a nightmare.

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

Keeping your hands on the keyboard is irrelevant unless you are a data entry clerk. If you are a software developer you are far more likely to spend more time doing things other than typing. Designing data structures, diagramming databases, researching approaches to solving a problem. Thinking.

The above is also used hand-in-hand with "vim is faster". Yeah, again, if you are a data entry clerk entering tax return records this might have some value. Software development? Nah. The time one could save by only having to move a finger a few centimeters is but a rounding error in the context of any non-trivial software development project. 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. Debugging alone takes orders of magnitude more time than anyone could save by typing faster.

Not using the mouse. You know, those of us who grew up using, designing, building and programming computers that did not have a mouse were ecstatic when the mouse arrived. It's just plain silly to malign the mouse. I will say that I switched to a thumb operated trackball a long time ago. I don't go looking for a mouse. My trackball is always there, quite literally touching the right edge of the keyboard. And I don't have to move it all over the place to use it.

Carpal tunnel. Serious problem. I suffered from this about fifteen years ago. Doing 18 hour days in front of the keyboard was red-hot painful. I tried different ideas. I knew people who had to have surgery on both wrists and were never again the same. I wanted to avoid that scenario.

I ultimately did two things: First, I switched to a thumb operated trackball. Mice are not designed right and you have to move all over the place all the time. This is very repetitive and not good. Second, I designed and built my own desk. I welded a steel framework that supported a surface for the monitors at 29 inches off the floor. The framework also had a full length shelf in the front with the surface dropped down about three inches. The front of that shelf had a 2 inch raised lip. So, my forearms rested on this lip and my keyboard and trackball were two inches below that. My hands naturally drooped into that cavity. No more carpal tunnel. Being in front of the computer doing everything from mechanical to electrical to software engineering using various interfaces for 16+ hours is normal for me. I have not had any issues in 15 years or so. None.

All of the arguments for vim are simply irrelevant. The only argument I could find for knowing how to use it at a basic to mid level is this: If you find yourself having to access a remote system with a computer that dates back to the stone age you might have no choice but to have to edit files remotely and you know that vim/vi will be on that system. Personally, I have never in over thirty years had that problem. These days I'll use something like CuteFTP if I have to or, as I said above, PyCharm and other IDE's (PHPStorm, etc.) know how to talk to servers and allow remote editing "in comfort". I mean, you can buy a $200 PC laptop with a large 17 inch screen, full keyboard, etc. these days. No more excuses.

Bottom line: vi/vim don't make sense because they do not provide any advantages when compared to state of the art IDE's.

Wow, I ended up typing more than I wanted to. Oh well.

Re: Helping a Million Developers Exit Vim

#405

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…

Interesting, wonder what the reasoning was for folding ESC into F11. Did ctrl-[ work, too?

It did, in fact. I have a VT220 on my desk at work.

Re: Helping a Million Developers Exit Vim

#406

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.

Or a plot twist...she knew all along!

(but I guess you already asked her)

Re: Helping a Million Developers Exit Vim

#407
post #354

Earlier quoted context omitted.

> The same thing with vim using nonstandard way of quitting. How do you quit man? How do you quit less? 'q' to quit is pretty standard in the TUI world.

I tried it and typing q does not seem to exit the program. Nothing I tried worked and I had to exit the whole terminal.

Well it's not quite that simple because it's more complicated than those tools. Once you are in ex mode ':' though it uses the standard exit key.

As for if you stuck in insert mode, this is more akin to when you have text highlighted in a GUI editor, the shortcuts change because you're in a different mode.

Remember all editors have modes, vim is just a bit more in your face with them.

Re: Helping a Million Developers Exit Vim

#409

Earlier quoted context omitted.

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 disagree. I use VSCode completely without mouse (and no vim mode).

Yes, you can use a lot of other editors without a mouse. The advantage of learning vim/vim mode is that you can be proficient with them without having to learn their editing keybindings. Vim mode acts as a common interface. I even use those keybindings in Chrome with cVim.

Re: Helping a Million Developers Exit Vim

#410

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.

Perl & Python are also installed on most UNIX machines I've seen. I know Perl was invented to address weaknesses with Awk. I use all 3 to some degree, but is there a reason you like Awk?

The pattern -> action format of awk is really nice for simple apps, it's a built in for loop + switch statement that reads from stdin. It's also simple to change what the record/column seperators are, so it can handle some quite complex data shapes with zero code.

Awk and python don't deal with stdin/stdout quite as nice (AFAIK) and there is always the temptation to do too much with them.

As an example, the other day I wrote a DSL in awk, it takes a mostly CSV file in and outputs sql commands. If you did it in python you could run the sql directly, but the awk stdio version makes it easier to combine as needed. If I want to run the generated sql I can pipe that to the sql cli client, if I need to hand it to QA I can just pipe to a file etc.

Post reply on HN