you are viewing a single comment's thread
view the rest of the comments
[–] 23 points 1 month ago (2 children)

Explain pls for us vimless noobs

  • source
  • hideshow 4 child comments
  • [–] 27 points 1 month ago (1 child)

    Direction navigation in vim is hjkl.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 22 points 1 month ago (4 children)

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

  • source
  • parent
  • hideshow 8 child comments
  • [–] 46 points 1 month ago (1 child)

    No, you're 100% right. The only reason it's this way is this: https://pikuma.com/blog/origins-of-vim-text-editor

    These literally were the arrow keys on the machine that vim was originally developed on.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 12 points 1 month ago (3 children)

    Why the hell didn't they go with JIKL or something instead then, so the pattern at least resembles the direction it navigates?

  • source
  • parent
  • hideshow 6 child comments
  • [–] 26 points 1 month ago (2 children)

    Wasd was revolutionary at the time

  • source
  • parent
  • hideshow 4 child comments
  • [–] 11 points 1 month ago* (last edited 1 month 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.

  • source
  • parent
  • [–] 8 points 1 month ago (2 children)

    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.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 3 points 1 month ago (3 children)

    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.

  • source
  • parent
  • hideshow 6 child comments
  • [–] 5 points 1 month ago (1 child)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 month ago (1 child)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 1 month ago (1 child)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (1 child)

    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.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago* (last edited 1 month ago) (1 child)

    Custom layout was only part of my answer. Most vim users don't use custom layouts and second point still holds.

    I could just as easily say it’s better to remap wasd to the arrow function and have the FN key toggle it,

    Great idea. It would give you like 5% of what vim offers but 5% is better than 0%.

    much higher number of people already have that navigation method trained into muscle memory

    All vim users have hjkl trained into muscle memory. No one is saying that it's automatically better. vim has a learning curve. When you know how to use it it's simply better than traditional editors.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago*

    I use the normal arrow keys in vim to navigate, but I love all the other neat features and I propably only know <20% of them.

    And maybe on a 40% keyboard with custom layout every key is very near. My arrow keys are very custom placed, btw. I have 4 of the same keyboard (Planck), because I am so used to my own custom layout and layers.

  • source
  • parent
  • [–] 2 points 1 month ago (1 child)

    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

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (1 child)

    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 :)

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 month ago (1 child)

    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

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (1 child)

    Sounds interesting. How do you set this up in Linux? I'm just remapping keys on X level now.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (1 child)

    I‘m sure there’s a good way to do this on the OS side, but I‘m doing it in ZMK/ QMK.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (1 child)

    This is just for wireless? I still prefer to use USB. I will try to find something similar, thanks.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 1 month ago (1 child)

    ZMK does wireless and wired, with a focus on wireless, whilst QMK has its focus on wired and i’m not sure whether it does wireless.

    I got two Aurora Sofle (shoutout to splitkb for having good products and customer service) one wired with qmk (and MX switches) and one wireless with zmk (and kailh switches). Both work very well, but i’ve found that I prefer kailh switches over MX.

    QMK is also used by folks like Keychron for their wired keyboards, and for gui focussed ppl it’s configurable via the browser app „via“.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 8 points 1 month ago (2 children)

    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.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 1 point 1 month ago (2 children)

    I'm one of the noobs. You use letter keys to navigate around text?

  • source
  • parent
  • hideshow 4 child comments
  • [–] 10 points 1 month ago (1 child)

    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)

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (1 child)

    Oh, I did not know of 'A' before. Hopefully I can train myself to use it.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago (1 child)

    I use ‘O’ the most. It inserts a newline at the end of the line and starts Insert Mode after the newline.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 1 month ago

    Awesome. After many years of vim-use I learned about CTRL+n as well. A game changer.

    And while we're at it, I also installed vim-nox to be able to use vim-snippets with utilsnips to TAB for even more joy of programming with vim. [=

  • source
  • parent
  • [–] 5 points 1 month 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)

  • source
  • parent