Live data from Hacker News

Helping a Million Developers Exit Vim

stackoverflow.blog

431–440 of 489 posts

Re: Helping a Million Developers Exit Vim

#431

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…

Since you mentioned using a trackball due to carpal tunnel when using a mouse I thought I should share my setup. I don't really suffer from these issues (with the exception of scrolling) but it pays to prevent them.

I only use a mouse when I use many monitors (3+) and the desktop surface area is significant. In all other cases I prefer to use a very customized touchpad setup. I use a business laptop because it has buttons for the touchpad both below and above the touchpad(the buttons for the trackpoint. And I configured it so that all the buttons below are the normal click and a button above is the secondary click. And I disabled tapping because tapping gives you no feedback and prevent you from resting your hand on the touchpad. The main reason I switched is because I find scrolling on a touchpad (either 2 finger scrolling for short distances or circular scrolling for longer distances) a lot more comfortable than the scroll wheel. Scrolling a lot using a scroll wheel makes my middle finger hurt and middle click auto-scrolling doesn't work everywhere.

This means I can mouse around using either hand in the same way. Most touch pads are configured with buttons (reals or virtual) in the bottom left and right sides for left and right click. This means using the touchpad is different for the left hand than it is for the right hand.

The only other touchpad I found as usable was the Apple trackpad when it still had a button. I clicked with the button and the difference between primary and secondary click was whether I had two fingers on the trackpad.

Re: Helping a Million Developers Exit Vim

#432

Earlier quoted context omitted.

Is ":q!" really that crazy after 2 secs with Google?

Yes it is, if you are coming from a GUI life, start using the shell for the first time, and suddenly get thrown into some unnamed editor by git. :P It breaks about every convention on editors and discoverability that you're used to. Start GNU nano. It puts me in a position where typing edits the file I opened. It shows me the name of the program. It shows some keyboard shortcuts for interacting with the program. (Tho…

My worst memories of starting out with programming is doing a git merge or pull, then before the command was done, I'd start typing git push or... and then I got stuck in insert mode. This was after I had learned that :q och :wq! did the job, and I could not for the life of me figure out how to get out of insert mode.

Fun times.

Re: Helping a Million Developers Exit Vim

#433

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…

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

Re: Helping a Million Developers Exit Vim

#434
post #378

Earlier quoted context omitted.

I really don't care who is responsible or which came first. I'm only pointing out the inconsistency and the problems it causes.

Don't worry, in few years new bindings will be familiar to new people straight from their birth date. Then they will complain about changes and you'll tell them that changes were made long before.

Shortly after the introduction of the first generation of brain-computer interfaces: "Why do I have to think of Ctrl-C to copy text in this program? All the other programs have me think of a banana to copy a selection!"

Re: Helping a Million Developers Exit Vim

#436

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…

To me, using "no mouse is needed" as a positive is like building a car that uses extra pedals to steer and saying "no steering wheel is needed". Mice are great. I want to use mice.

Mice have their place. But they have issues with precision, RSI, and force the need to move the hands to/from home row.

And if you use a laptop as a primary work tool, being able to avoid the touchpad (or trackpoint for those ThinkPad users out there) is a huge advantage.

Re: Helping a Million Developers Exit Vim

#437

Earlier quoted context omitted.

Is ":q!" really that crazy after 2 secs with Google?

Yes it is, if you are coming from a GUI life, start using the shell for the first time, and suddenly get thrown into some unnamed editor by git. :P It breaks about every convention on editors and discoverability that you're used to. Start GNU nano. It puts me in a position where typing edits the file I opened. It shows me the name of the program. It shows some keyboard shortcuts for interacting with the program. (Tho…

Or because every other editor you've had is inconsistent with Vim. It is dumb if people are being dumped there by Git. I guess if you try to use it and get stuck it is a lot easier to escape than if someone gets dumped there without even knowing where they are.

Re: Helping a Million Developers Exit Vim

#438
post #410

Earlier quoted context omitted.

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…

Neat, will have to look into that. I think Perl might have a command line switch with similar behavior that runs your command across every line of whatever you pipe to it, but that might not be what you're saying.

Re: Helping a Million Developers Exit Vim

#439
post #162

Earlier quoted context omitted.

Using vi/vim lets one enter a secret dark corner of programmer society. Memorize vi keystrokes is knowing the secret handshakes. Able to Exit vim is finding the door to enlightenment. If vi comes with an easy "back" button like all browsers, no-one will learn it. One needs to be trapped inside for a while to feel the power of the dark side.

Is ":q!" really that crazy after 2 secs with Google?

Or (I'm surprised it's not been mentioned already): Shift-ZZ to save and close (saves an extra keystroke)

Re: Helping a Million Developers Exit Vim

#440
post #410

Earlier quoted context omitted.

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…

flukus, thank you. I was trying to say something like that but wasn't able to quite word it right.
Post reply on HN