Live data from Hacker News

Vim users: stop using hjkl

vimcasts.org

81–90 of 218 posts

Re: Vim users: stop using hjkl

#81

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

You're a professional programmer, you use a keyboard all day, so you touch type right? hjkl sits right on the home row, where your fingers sit. It is just a natural place to put movement keys. Nothing to do with the number of keys on the authors keyboard.

Like you say when your jumping around a lot then it matters less. When you're typing a lot then it does matter to keep your fingers on the home row.

Re: Vim users: stop using hjkl

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

I'm sure you've heard of the EasyMotion plugin. If you're like me, you probably found it to be overkill. I made a fork that limits the EasyMotion effect to the current line (with some slight adjustments), and my efficiency navigating the current line has increased dramatically. I encourage you to give it a go

https://github.com/joequery/Stupid-EasyMotion

Re: Vim users: stop using hjkl

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

I use both vim (over ssh) and modern GUI programming editors on a regular basis with extremely large code bases. I am thoroughly familiar with the the various navigation shortcuts available to me and (at least for me) find that navigating and editing source code in vim is still faster by a large margin compared to modern editors that have the convenience of modeless editing.

That's not to say that modern editors don't have their advantages but I think it is a bit of a stretch to argue that modern editors are substantially better at editing text than vim.

Re: Vim users: stop using hjkl

#84
post #39

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

+ and - to move 1 line up. Combine with a number, 4+ to move down 4 lines, complementing 4G or :4 to move to 4th line.

I don't see those as an improvement (i.e. worth committing to muscle memory) for `j` and `k` that would incentivize me to no-op those two keys. You can do `4j` as well.

Re: Vim users: stop using hjkl

#85
post #51

Earlier quoted context omitted.

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

> You speak as if modal editing came first and universally agreed upon better things evolved afterwards.

That's exactly what happened, and think before objecting, because I was there. I used vi while working for NASA during the 1970s, when mode changes made sense (it saved paper on paper terminals). Since then, it has stopped making sense.

> I know this isn't true. I know you know this isn't true. You're being highly disingenuous.

When I wrote Apple Writer in the late 1970s, I suspected it would become popular because it eliminated the modes that plagued most contemporary editors including vi. I was right -- it did. Apple Writer became a best-seller because people hadn't yet realized that modes and mode switching were pointless burdens in a era of glass terminals and extended keyboards.

I can't believe there are people who haven't learned this elementary lesson now, over 30 years later.

Re: Vim users: stop using hjkl

#86
post #12

I use hjkl everyday. Its pretty handy. The arrow keys are too far away from the maon keys. Thats why hjkl is very useful

I have tried to make that switch several times but still I found more comfortable the arrow keys (especially because up key is in fact above the rest)

If I have to pay that fraction of time for the convenient arrangement of keys. I will pay it happily.

Re: Vim users: stop using hjkl

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

Not only that, I hate web pages that do not allow to increase the font size with CTRL+ and CTRL-. That's just so 1990s.

Re: Vim users: stop using hjkl

#88
post #51

Earlier quoted context omitted.

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

I use both vim (over ssh) and modern GUI programming editors on a regular basis with extremely large code bases. I am thoroughly familiar with the the various navigation shortcuts available to me and (at least for me) find that navigating and editing source code in vim is still faster by a large margin compared to modern editors that have the convenience of modeless editing. That's not to say that modern editors don'…

> I think it is a bit of a stretch to argue that modern editors are substantially better at editing text than vim.

Yes, well put, except it's true -- modern editors are much more efficient at editing large code bases than vi/vim. None of them require a "cheat sheet" of keyboard arcana, for the simple reason that to use a modern editor, you don't have to cheat.

It gives one pause to consider that Pico, the tiny, throwaway command-line editor, is easier to use than vi. The proof? It has become the default choice when someone wants to save time.

Re: Vim users: stop using hjkl

#89
post #87
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…

Not only that, I hate web pages that do not allow to increase the font size with CTRL+ and CTRL-. That's just so 1990s.

Works perfectly on opera?

Re: Vim users: stop using hjkl

#90
If I can see where I want the cursor to be, why can't I put the cursor there ... by looking at it and pressing a 'jump to' modifier, or by touching it, or whatever.

Even as a Vim fan, this isn't better than mousing, this is similarly annoying to proxy movement through other things.

Post reply on HN