Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

51–60 of 218 posts

Re: Vim users: stop using hjkl

#51
post #38
post #24

Earlier quoted context omitted.

> But a comment that essentially boils down to "vim is archaic" in a post about vim usage habits is totally ridiculous ... And entirely topical. Young programmers who read such posts may not realize how many more efficient options are now available. Speaking about vim as though it's an obvious choice in 2013 would be like insisting that everyone code in Fortran in 2013.

Oooh. I'd love to hear those many more efficient options!

> I'd love to hear those many more efficient options!

This may come as a surprise, but modern programming editors don't require the operator to switch between three mutually exclusive modes -- insert, delete and navigate. That's because modern keyboards have keys dedicated to those purposes, which means the operator doesn't have to either wonder which mode he is in, or switch modes, which saves an enormous amount of time when programming.

The first step toward modern editing is use of the arrow keys for navigation. The next step is to realize, if the arrow keys can reposition the cursor without using letter keys, then maybe there's no reason to have to switch modes.

Vim's focus on keyboards that no longer exist, and on displays that no longer exist (including the paper terminal I used with vi while working for NASA forty years ago), requires an incredible number of unnecessary keystrokes, as exemplified in this typical conversation:

http://stackoverflow.com/questions/1379198/in-vim-how-do-i-d...

Notice that no one says "have you considered solving the problem by changing editors?"

Re: Vim users: stop using hjkl

#52
post #21
post #8

Earlier quoted context omitted.

No kidding. I spend a ton of my day in Vim and use the arrow keys because I like them . That's the only reason: I've tried hjkl (I mean, I've ascended seven times in Nethack, I know hjkl) and I don't like it. I even use motions...with the arrow keys. I have a Mac and the arrow keys are all of three and a half inches from the home row and I do not have the little blob in the back of my brain that lights up with pain w…

I don't do use hjkl out of concerns about optimality, personally. I do it because I find moving my hand back and forth from the home row to the arrow keys is hard on my wrists, and I get tired sooner. I've found that coding is a lot less hard on my hands since I started using the traditional vim way of doing things, but YMMV of course.

I'm sure that's true for some folks, yeah. For me, I find it to be less of a concern since moving to a laptop keyboard (less distance to move, forced me to stop pounding the keyboard) and working at a standing desk a lot more. Those seemed to address the deeper causes of my ergonomics issues.

Re: Vim users: stop using hjkl

#53
Oh please, not vim again. Now you are not even supposed to use the already ridiculous hjkl mappings. It's really amazing to me to see this sub-culture attach itself to an editor that was designed as it is BECAUSE THE AUTHORS DID NOT HAVE KEYBOARDS WITH MORE KEYS ON THEM!

"hjkl is faster than reaching for the cursor keys". Holy frigging crap! Really? You are so good as a developer that MILLISECONDS make a difference? It does not take you hours to come up with algorithms or program structures to solve problems. And, when you do, you write code at blinding speeds (using vim) with NO BUGS, therefore MILLISECONDS matter because you are not one of those programmers who will need to spend HOURS hunting down and fixing bugs. Oh, yes, and 100% of your time is spent coding. You don't lookup documentation and you don't do any file management at all. You are a damn coding machine who can actually measure productivity by the millisecond and who must absolutely use the shittiest possible UI in the context of modern hardware to shave milliseconds from your every keystroke. You never reach for your iPod to look for music or read through HN, Facebook or even your email throughout the day because that wastes minutes. You never take a break, shoot the shit or theorize and ponder with your coworkers because you measure your life by the MILLISECONDS of flight time difference between the hjkl keys and the up, down, left, right keys 12cm away.

Right. The reality is that this is just a "I belong to the club" delusion that has nothing whatsoever to do with being a good programmer, writing good, clean, usable, extensible, reusable, fast, efficient and bug-free code. It has nothing whatsoever to do with delivering a product anyone wants and doing that on time and on budget. It has nothing whatsoever to do with being an entrepreneur, building a company, paying the bills and delivering value to users and investors alike.

It has everything to do with being a complete child and refusing to understand that there are places where you could optimize your time and energy that represent, without exaggeration, PRODUCTIVITY GAINS IN THE ORDER OF MILLIONS TO BILLIONS OF TIMES GREATER than the time required to reach for arrow keys or, Darwin forgive, the MOUSE (yes, he used that word) a few hundred times per day.

Grow up!

Re: Vim users: stop using hjkl

#54
I have in my vimrc something I'm calling restrain.vim. In effect it allows me to rebind a double press such as jj, kk, hh and ll to do something else. That means I can only press any of these keys once, if I press a second time it does a different thing (I'm using j and k for jumping to the next line number ending in 0, or ending with a digit if I supply a count, so it's kinda like relative line movement with absolute line numbering).

So when I press j once it moves down one line, and if I press any other command it's reset so I can press j once again next time (so it allows going down a line and pressing . repeatedly). But from the second consecutive press each single j press will be doing another thing. This is helping me a lot with retraining to using other methods to get around instead of spamming j. Wait, that's a good wordplay, restraining, retraining. Hmm..

Re: Vim users: stop using hjkl

#55
post #24

Earlier quoted context omitted.

This comment is ridiculous. Being "anti-vim" is perfectly alright with me. I use vim because it's the fastest thing I've ever used by a very wide margin. I also respect others who find it too hard to learn or find they're more productive elsewhere. But a comment that essentially boils down to "vim is archaic" in a post about vim usage habits is totally ridiculous, so in the nicest way possible, get lost.

> But a comment that essentially boils down to "vim is archaic" in a post about vim usage habits is totally ridiculous ... And entirely topical. Young programmers who read such posts may not realize how many more efficient options are now available. Speaking about vim as though it's an obvious choice in 2013 would be like insisting that everyone code in Fortran in 2013.

You're commenting on a vim post in order to help lost young programmers understand that there are other options besides vim?

Speaking about vim as though it's an obvious choice in 2013 would be like insisting that everyone code in Fortran in 2013.

Oh, now talking about how to use vim effectively is like insisting that everyone uses an archaic programming language? I suppose if we were to have a post here talking about how to use the command line effectively, you'd feel obliged to educate young programmers that we've moved on from the 1970s.

Re: Vim users: stop using hjkl

#58
post #3

I hate hjkl for the simple reason that I learned to type with my index fingers on F and J keys. I use search a heck of a lot more but I guess I should add w, b and e to my repertoire.

I also learned to type with my index fingers on F and J (I think it's quite standard, given the typing classes I took and the little nibs on my keyboard), and I've always been fine with HJKL. What's the problem you have with it, exactly? It sounds like you're saying you'd prefer jkl;, but I don't think that would be better; moving to the left seems perhaps least common to me.

I guess I find myself hitting the wrong keys each time and I'm quite happy with ; being used for something else.

Re: Vim users: stop using hjkl

#59
post #2

> Moving your Vim cursor around using the arrow keys is a bad habit ... Yes, as is having a keyboard with more than 64 keys, a pointing device, software that allows character insertion, deletion and cursor motion all without changing modes, or any computer designed after 1980. We must all fight against this rising tide of convenience and efficiency by insisting that everyone use vim and its descendants.

Fewer keys and being old aren't arguments against something being convenient and efficient... See for instance the benefit that 22 keys can have with a stenotype machine: http://en.wikipedia.org/wiki/Stenotype Should everyone learn to use one? Probably not, but if you're invested already it wouldn't be prudent to ignore the advice of those already familiar with the device. Similarly with vim.

Re: Vim users: stop using hjkl

#60

Oh please, not vim again. Now you are not even supposed to use the already ridiculous hjkl mappings. It's really amazing to me to see this sub-culture attach itself to an editor that was designed as it is BECAUSE THE AUTHORS DID NOT HAVE KEYBOARDS WITH MORE KEYS ON THEM! "hjkl is faster than reaching for the cursor keys". Holy frigging crap! Really? You are so good as a developer that MILLISECONDS make a difference?…

Well now you're making me rethink everything.
Post reply on HN