Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

61–70 of 218 posts

Re: Vim users: stop using hjkl

#61
post #41

Linkbait title alert. Please, please stop this crap. Article really says: n00b vim users, consider disabling hjkl while learning other movement commands. What vim user does all their movement with hjkl only anyway? If you're going to deliberately cripple your editing habits like that, or if you're not even bother to learn other movement command at the same time as getting used to hjkl, you might as well stick to note…

>What vim user does all their movement with hjkl only anyway? Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location.

> Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location.

Young programmers should be made aware that there are now programming editors that do away with the need to think of a way to trick the program into moving the cursor where you want it to go. Modern editors respond to direct, concise keyboard entries to move the editing cursor to the desired destination. Like pressing the arrow keys. Or pointing at the destination with a mouse and clicking -- things like that.

Even ubiquitous command-line editors like Pico are easier to use than vi/vim. The reason is that Pico doesn't have vim's history to contend with, and its consequent rearward compatibility issues.

Re: Vim users: stop using hjkl

#62
post #35

Earlier quoted context omitted.

This isn't about being some old fogey who's stuck in the 80s. It's good ergonomics to avoid hand movements away from the home row to the arrow keys or the mouse. My wrists have felt significantly better since I went cold turkey on the arrow keys.

Same here, and I type dvorak. The hjkl keys are in a completely different location on a dvorak keyboard as opposed to qwerty, and yet I have seen a reduction in wrist pain.

Must be a fun exercise using hjkl on dvorak. I think I would end up remapping the whole normal mode to the same positions of a qwerty keyboard.

Re: Vim users: stop using hjkl

#63
post #61

Earlier quoted context omitted.

>What vim user does all their movement with hjkl only anyway? Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location.

> Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location. Young programmers should be made aware that there are now programming editors that do away with the need to think of…

So tap-tap-tapping on the arrow keys like a chicken is a more efficient way of navigating text documents then?

Re: Vim users: stop using hjkl

#64

Hard mode, that's great. Does vim have a help-a-fellow-learn-vim mode? Instead of it's normal Mostly-fail-to-give-you-any-visual-feedback-and-just-treat-you-with-smug-indifference-while-you-try-various-keys mode?

There is a vim tutorial baked in that will walk you through some things.

Re: Vim users: stop using hjkl

#65
post #51
post #38

Earlier quoted context omitted.

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…

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

You speak as if modal editing came first and universally agreed upon better things evolved afterwards. I know this isn't true. I know you know this isn't true. You're being highly disingenuous.

Your link is equally disingenuous since you either don't understand that the operation involved there is not one you can do in-stride or with as few keys in any other "modern" editor, or if I give you slightly more credit but presume malice then you're being willfully misleading again.

Re: Vim users: stop using hjkl

#66

It's amazing how fast you can retrain muscle memory by disabling certain keys. It's frustrating for about half a day, then kind of annoying for a day or two, and then you've completely retrained yourself. In just a day or so! However, I like to fiddle with the cursor while I'm thinking. Might be just me. I don't like feeling like I'm completely constrained. It's nice to casually move around when I'm pondering somethi…

> I like to fiddle with the cursor while I'm thinking.

That's a good point - I do that too. Also, if I've switched my attention somewhere else, then back to vim, I find myself doing "hlhlhl" to get my attention back to the cursor immediately.

Re: Vim users: stop using hjkl

#67

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?…

dude chill

Re: Vim users: stop using hjkl

#68
post #55
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.

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 abou…

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

Yes, and what better place?

> Oh, now talking about how to use vim effectively is like insisting that everyone uses an archaic programming language?

Based on the number of objections to a discussion of vim's alternatives, yes -- that's a legitimate comparison.

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

Only in the midst of an amazing discussion that included various "cheat-sheet" strategies to get around the behaviors of an editor that demands cheating to be productive. Given that context, saying that newer editors don't require you to cheat seems entirely topical.

Re: Vim users: stop using hjkl

#69
post #61

Earlier quoted context omitted.

>What vim user does all their movement with hjkl only anyway? Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location.

> Having used vim for nearly two decades now, my primary movement routine seems to be start with "/" and "?". In other words, jump to the approximate location using a word search and "W" or "w" as needed to the specific word, then use the hjkl or other commands to further refine the cursor's location. Young programmers should be made aware that there are now programming editors that do away with the need to think of…

How is using text find to move to where you want "tricking" the program? With Easy Motion that type of cursor movement becomes even easier. Using a mouse just slows a vim/emacs user down.
Post reply on HN