reddit / emacs

vimkeys (of course talking about evil-mode)

super_momonga · 2022-07-21 00:33
i tend to use the mayority of functions that vim has, the commands, shortcuts, etc., but still i dont the the point of using the navigation keys (h,j,k,l), i use the normal navigation keys of the keyboard (up, down, right, left) and i feel way better maybe is just personal preference, but it theres a benefit of using the navigation vimkeys?, i have try them out for a while, trying to transform my workflow, but i dont see the point. What all you think
Shimmy-choo · 2022-07-21 02:19
One answer is: it's your editor, ain't no rules, do what works for you! But on the other hand: I will say hjkl are pretty dang useful - the advantage is halving the number of times I have to take my fingers away from home row: which is huge for me. It can be hard to break the habit of using arrow keys: what some people do to force themselves to develop the habit is unbind the arrow keys: so you are forced to use hjkl. If you did this for a week and still didn't see the advantage - firstly I'd be amazed, but also I'd say you have given it more than a fair shot.
azfrak · 2022-07-21 02:44
echo this Your editor, your rules. Thats the emacs way after all :) I really like having the vim keys for navigation though. I switched to evil a few months ago and it definitely has made an improvement on my workflow and comfort at the keyboard. Although a part of me wishes that it was j,k,l,; for navigation instead, given that these are the keys we actually rest on. Im sure there is a historical reason or maybe even an opinionated practical reason it is the way it is, but given I am an emacsien I could always customize it to my liking if I was feeling that way inclined, but having the consistent vim keys across browser plugins, terminal emulators etc. is pretty dang nice. I just got a custom board delivered today though that I am going to build this weekend, and am contemplating having a nice layer switch have the arrow keys very readily available, so that I don't necessarily need to leave insert mode to normal mode everytime I want to move two characters to the left.
yurikhan · 2022-07-21 06:22
There is absolutely no point in `hjkl`. On the keyboard, they are all over the place, with no rhyme or reason. vim navigation on Dvorak ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───────┤ │ │ │ │ │ │ │ │ │ │ │ → │ │ │ │ ├─────┴┲━━┷┯━━┷┯━━┷┯━━┷┱──┴┬──┴┲━━┷┯━━┷┯━━┷┯━━┷┱──┴┬──┴───────┤ │ ┃ │ │ │ ┃ │ ┃ ← │ │ │ ┃ │ │ ├──────┺━┯━┷━┯━┷━┯━┷━┯━┹─┬─┴─┬─┺━┯━┷━┯━┷━┯━┷━┯━┹─┬─┴─┬────────┤ │ │ │ │ ↓ │ ↑ │ │ │ │ │ │ │ │ │ └────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴────────┘ vim navigation on Colemak ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────────┐ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───────┤ │ │ │ │ │ │ │ ↓ │ → │ │ │ │ │ │ │ ├─────┴┲━━┷┯━━┷┯━━┷┯━━┷┱──┴┬──┴┲━━┷┯━━┷┯━━┷┯━━┷┱──┴┬──┴───────┤ │ ┃ │ │ │ ┃ │ ← ┃ │ │ │ ┃ │ │ ├──────┺━┯━┷━┯━┷━┯━┷━┯━┹─┬─┴─┬─┺━┯━┷━┯━┷━┯━┷━┯━┹─┬─┴─┬────────┤ │ │ │ │ │ │ │ ↑ │ │ │ │ │ │ │ └────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴────────┘
IceOleg · 2022-07-21 06:55
> Im sure there is a historical reason or maybe even an opinionated practical reason it is the way it is There is a very good historical reason. The original `vi` was developed on a terminal that didn't have separate arrow keys, but hjkl doubled as arrows: https://en.wikipedia.org/wiki/ADM-3A#Legacy
Horrih · 2022-07-21 07:09
I hate hjkl, not intuitive as arrow keys, and the h is one of the wort keys to hit when typing I personnally remapped ijkl to the same functions as arrow keys, which have the same layout as the arrow keys. I'd say feel free to remap them ! I'd still recommend moving directly from your keyboard instead of the arrow keys to avoid moving your hands, just pick something more convenient for you
deaddyfreddy · 2022-07-21 09:09
> home row: What keyboard do you use? Because when I use a standard non-ergonomic keyboard (especially on a laptop), I find it extremely unnatural to keep my fingers on home row, my hands tend to stay on something like `awef`/`jio;` instead.
deaddyfreddy · 2022-07-21 09:11
I prefer not to use any "arrow" shortcuts, jumping (avy) works better for anything beyond 4 items.
bravosierrasierra · 2022-07-21 10:34
imho: hjkl is a part of effective text editing system Vim author opinion about some practices: https://moolenaar.net/habits.html
Shimmy-choo · 2022-07-21 10:48
You're joking, right...?
AuroraDraco · 2022-07-21 10:59
Do what you think is more efficient. Personally I find those keys to be too far away and they distract me when writing (might as well scroll with the mouse if my hands are leaving the main part of the keyboard)
yurikhan · 2022-07-21 11:14
Only half-. If you are about home row efficiency, why are you on QWERTY?
ThockiestBoard · 2022-07-21 12:54
People on r/vim would tell you both are generally bad and you should use another form of movement (`f`, `F`, `t` `T`, `/`, `?`) but if it works for you then don’t worry about what other are saying is “better”, whatever that means.
ElephantTranquilizer · 2022-07-21 13:17
Do what works for you. Personally I like not having to leave the home row. I mostly just use j and k and use w, e, and b for horizontal navigation.
Schievel1 · 2022-07-21 14:03
I think using vims hjkl is only really beneficial if you’re touch typing. But then again, they should be shifted to the right by one key, so they are in the home row position of the right hand. Then again, it’s not that important if you’re using the other vim binds to move around anyway. (Like b and w etc) I put the arrow keys on jkl; on another layer. So to move around I am holding down the layer key and then I use jkl;. So I’m not moving my right hand to and from the arrow keys all the time
Schievel1 · 2022-07-21 14:06
When I don’t have my freely programmable ergo keyboard but a normal Dvorak one I still use hjkl :D
vaxdar · 2022-07-21 18:07
As others have said, do what's comfortable for you. I'm a dvorak user, and I really like using the right hand home row keys for directional motions. I shift them over to just be the right hand keys (htns), no shifting left one key as with the standard hjkl keys. I have the arrows on the same keys on a layer, so I have the same behaviour everywhere. I organize other motions (pgup/down, home/end, prev/next tab, etc.) around the same principles and locations so it's all very comfortable.
CosmosAtlas · 2022-07-22 17:06
Funny story, I actually use `hjkl` in programmer dvorak... It's fine, as long as you get used to it. I technically got familiar with vim bindings after I've switched to programmer dvorak. So transferring the mussle memory wasn't an issue for me anyway... YMMV
oouja · 2022-07-23 04:37
I actually liked HJKL when got used to it. Why? Because your main fingers rest on JK (one of the most common keys to press when moving through the file), and H/L are comparatively rare. ; as "move to a next certain char" command is useful too. IJKL is more intuitive, but puts all the strain on a single finger, and JKL; (up/down/left/right) requires to use a pinky which is not much better than a finger shift.