Hello, I was trying to configure i3 to match the functionality of vim (i3 uses jkl; because h is mapped to horizontal split), but when I was doing it I was wondering what the reason is behind every vim or vim-like editor using hjkl. It’s rather inefficient to have to move your index finger to the h key every time you want to move left. I know that the creator of vi had his hjkl keys mapped to arrow keys, but why hasn’t this changed. Is it a historical thing, or is there an actual logical reason.

  • nemith@programming.dev
    link
    fedilink
    arrow-up
    17
    ·
    1 year ago

    This is the terminal that was used by the creator of vi, Bill Joy.

    It should be obvious on why those keys were used. They weren’t “mapped” they literally were the arrow keys. It’s hard to change defaults. Anyone who knows vi keybinding and install work on vim or any other system.

    It would be easy for you to change your own keybindings. Why is there a need to change everyone’s default and break existing muscle memory.

    https://vintagecomputer.ca/wp-content/uploads/2015/01/LSI-ADM3A-full-keyboard.jpg

  • zygo_histo_morpheus@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    I don’t really think it’s much of a problem that h isn’t on a touch typing key because you don’t need to press h very often. I probably use : way more than h. (: requiring shift isn’t ideal though, although that’s another can of worms)

  • xigoi@lemmy.sdf.org
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Most Vim users use j and k more often than h and l (because there are many more ways to move horizontally), so it makes sense to leave them to the strongest fingers.

    • TechNom (nobody)@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      That would be a bad design, IMO. The index finger has 2 keys to manage, of which one needs its lateral extension. Though the pinky is weaker, the semicolon is in its resting position.

      The actual answer though, is Bill Joy’s keyboard. Another commenter has explained it.

      • xigoi@lemmy.sdf.org
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 year ago

        Do you also have a problem with WASD controls for games, since the middle finger controls two keys and one requires extension? Or even with actual arrow keys?

        • TechNom (nobody)@programming.dev
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          Gamers and typists/coders are completely different species. Besides, WASD keys don’t use lateral extension (assuming gamers use touch typing at all). Have you checked out any KB layout communities?

  • SuperFola@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I know someone that remapped their keyboard to have ;hjkl instead of hjkl; (this is a split keyboard running qmk). This way they could keep hjkl and not remap anything inside (neo)vim.