• IrateAnteater@sh.itjust.works
        link
        fedilink
        arrow-up
        26
        arrow-down
        6
        ·
        10 hours ago

        I know I’m just a vim-less heathen, but using letters for navigation in a text editor seems kind stupid when arrows exist.

        • expr@piefed.social
          link
          fedilink
          English
          arrow-up
          8
          ·
          edit-2
          6 hours ago

          The reason it’s so popular is because it provides directional navigation on the home row, with the direction that’s by far the most common (down) under your strongest, dominant finger (the index finger).

          It’s much better for both efficiency and ergonomics than arrow keys.

        • ExLisper@lemmy.curiana.net
          link
          fedilink
          arrow-up
          5
          ·
          9 hours ago

          Why would you move your hand to arrow keys when the letter are already under your fingers?

          ESC, use-letter-to-navigate, i, type, ESC, navigate, i, type

          Really simple. On my keyboard I re-mapped ESC to TAB so I don’t even have to move my hand to switch between navigate and insert modes.

          • IrateAnteater@sh.itjust.works
            link
            fedilink
            arrow-up
            5
            arrow-down
            1
            ·
            7 hours ago

            So you’ve transferred the required hand move from the right hand to the left, and added extra required keystrokes to accomplish the same task. I don’t see how that isn’t worse.

            • msage@programming.dev
              link
              fedilink
              arrow-up
              2
              ·
              7 hours ago

              Moving hands is an extremely time-consuming task when you’re typing 60+ words per minute. Couple of keystrokes are much much faster than relocating your hand twice.

            • ExLisper@lemmy.curiana.net
              link
              fedilink
              arrow-up
              2
              ·
              7 hours ago

              No, it’s a key stroke, not hand move. I don’t have to reposition my hand to hit ESC. You do have to reposition your hand to use arrow keys.

              Also, you usually move the cursor by more than just one character. It’s one extra keystroke to reposition the cursor, not to move it by one char. You have shortcuts to jump to end of file, specific line, end of line or even create and jump to bookmarks. All this with just standard keys, without repositioning your hands to use the mouse or arrow keys.

              • IrateAnteater@sh.itjust.works
                link
                fedilink
                arrow-up
                1
                ·
                6 hours ago

                Your keyboard must be slightly different than the one I have in front of me right now. Home row to esc and home row to arrows is the same distance on mine.

                • ExLisper@lemmy.curiana.net
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  6 hours ago

                  First, as I said, I remapped ESC to TAB key. Tab is very close.

                  Second, it’s different to hit ESC ones than to use arrows keys to move around. To go back to home row after using arrow keys I have to feel around the keys trying to find “j” again. Or look at keyboard. I don’t have to do that after hitting ESC once.

                  • IrateAnteater@sh.itjust.works
                    link
                    fedilink
                    arrow-up
                    1
                    ·
                    6 hours ago

                    I’m not bothering to talk about non default layouts. Remapping is a separate discussion, since I could just as easily say it’s better to remap wasd to the arrow function and have the FN key toggle it, since a much higher number of people already have that navigation method trained into muscle memory. This is a preference game no matter what, but it becomes an especially pointless discussion if you base it on custom layouts.

          • msage@programming.dev
            link
            fedilink
            arrow-up
            1
            ·
            7 hours ago

            I have it instead of CapsLock, tab is too useful to forego.

            But yes, arrow keys are too far, and I avoid them everytime I can, including in Shell

            • ExLisper@lemmy.curiana.net
              link
              fedilink
              arrow-up
              2
              ·
              7 hours ago

              Yeah, sorry. I have:

              Esc -> Caps lock (useless so far away)

              Caps Lock -> Tab (the most useful so closest)

              Tab -> Esc -> second most useful

              I had it for so long that I forgot which one is which :)

              • TerHu@lemmy.dbzer0.com
                link
                fedilink
                arrow-up
                1
                ·
                6 hours ago

                Imma throw another option into the ring which is Caps lock -> Esc / Ctrl. it‘s esc when tapped and ctrl when combined/ held for longer. veeeery useful

    • graycube@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      10 hours ago

      Instead of using the arrow keys most vi & him users navigate the cursor around the doc by using letter keys. I do it so subcociously now I am not sure which direction is the j when I use my phone.

        • NominatedNemesis@reddthat.com
          link
          fedilink
          arrow-up
          4
          ·
          edit-2
          8 hours ago

          Yes, (neo)vi(m) has different modes, in normal mode the characters are shortcuts, hjkl is used for navigation. However other methods are prefered, w, e, b - jumping words, f,t - jumping to a specific character etc. Its way faster. Also it can be combined d2w (d)eletes the next (2) (w)ord. Or more advanced di" (d)eletes the text (i)nside the “…”

          Insert mode is what you except: it writes what you type. Can be accessed by i - (i)nsert before a - (a)append after. Going back to normal mode is ESC (or many configure tab)

        • owsei@programming.dev
          link
          fedilink
          arrow-up
          4
          ·
          8 hours ago

          Vim has several modes. INSERT mode let’s you write text, NORMAL mode let’s you navigate (with h,j,k,l and others) and perform operations on the text with your keyboard, like “dw” to Delete Word or “A” to enter insert mode at the end of the line.

          You can use arrow keys to navigate in insert mode. However I just press escape, which changes to normal, navigate to where I want to, then change to insert mode.

          I may seem like this makes simple navigation complex, and it kinda does. But complex navigation becomes easier.

          Vi (and vim and neovim)'s primary concern is viewing and editing code, writing is secondary (although it’s still an excellent experience)