Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

21–30 of 218 posts

Re: Vim users: stop using hjkl

#21
post #8
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.

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.

Re: Vim users: stop using hjkl

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

I can see the point only so far as disabling the keys temporarily in order to force yourself to learn and use some of the more powerful key combinations.

But, I had to deal with hjkl on dumb terminals either without arrows, or with arrows that didn't work. I always hated it. The arrow keys I find very obvious, simple and effective.

Re: Vim users: stop using hjkl

#23
post #8
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.

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…

But as Drew points out in his post, moving by by word (w,b and e) and by character search (f,F,t,T) is much faster the arrow keys or h,j,k,l.

The article isn't about not using h,j,k,l completely but encouraging people to use those other keys for movement.

Re: Vim users: stop using hjkl

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

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.

Re: Vim users: stop using hjkl

#25

What I like about VIM people is they explain you that mouse is evil, arrow keys are evil and now the basic hjkl (btw corrected into hell in iPhone keyboard) are evil too. I have even see a guy at a ruby conf who were using only keystrokes to browse the web. I wonder how it deal with flash animation. Anyway so now, he can replace his trackpad with a swimming pool for worms of smugueness. That's pretty cool.

We don't deal with flash. We curse the foolish website developer and route its domain to /dev/null. Using VIM.

Re: Vim users: stop using hjkl

#26

One of the best (collection of) cheatsheets: http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial... The pdf version can be found here: http://www.glump.net/howto/vim_graphical_cheat_sheet

I never found the keymap cheat sheets useful. It tells me what happens if I press a certain key, but what I need is the reverse. Tell we what key to press if I want X to happen.

When using a cheat sheet like that I waste a lot of time scouring the image looking for text relating to the type of operation I want. I'd rather have a list of options grouped by operation type.

Re: Vim users: stop using hjkl

#27
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…

But as Drew points out in his post, moving by by word (w,b and e) and by character search (f,F,t,T) is much faster the arrow keys or h,j,k,l. The article isn't about not using h,j,k,l completely but encouraging people to use those other keys for movement.

Sure. And don't get me wrong--I use them! (Though I will admit that also use that touchy-pointy thing that's bolted on below my spacebar for getting around too, which I never did on Windows or Linux.) But when I need to move character-by-character, for me, it makes way more logical sense to use the things with the left, right, up, and down marks on them because that's what they're there for. hjkl doesn't make sense to me, so I don't use it.

(Something like HJUK--or even just WASD--would make more sense to me, but I don't care enough to start remapping all the live-long day.)

Re: Vim users: stop using hjkl

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

The other stuff you mentioned at least has upsides. Moving your hand over to the arrow keys does nothing that hjkl doesn't, and it's slower. There is literally no upside.

Re: Vim users: stop using hjkl

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

Re: Vim users: stop using hjkl

#30

No advice on moving from line to line? Word and character movements are great (and well worth learning), but how do you suggest moving to just the next line without spamming `w`?

For moving directly vertical:

:nnoremap k gk

:nnoremap j gj

These move up/down one character, even if it is the same line wrapped over. Really beneficial for things like LaTeX editing.

Post reply on HN