4 ms·
Not sure what's outdated? Modal editing isn't outdated. The position of hjkl hasn't changed, so it isn't as problematic as Emacs keys or the vim escape keys. HJ
by Sakos 3y ago
Not sure what's outdated? Modal editing isn't outdated. The position of hjkl hasn't changed, so it isn't as problematic as Emacs keys or the vim escape keys. HJKL being on the home row has the same benefits as, say, WASD for movement in games, where using the arrow keys is objectively worse due to placement and the lack of keys around it.
- BillyTheMage 3y agoSpeaking of WASD, I personally use IJKL instead of HJKL because it doesn't make sense to my brain for 4 directions to be in a straight line.
- ilaksh 3y agoRead the link. Modal editing dates from the editor era in which time it generally was infeasible, impractical, or very technically challenging to update the screen and accept commands in a unified mode. The cursor keys being on the home row is just because it happened to be that way on the terminal where vi was invented. We have long since standardized on separate cursor keys, which are more intuitive.
- mcswell 3y agoLike orbital-decay says: intuitive matters not at all. Convenience is what matters. I don't use a modal editor, but I do have the control keys on my Windows keyboard mapped to cursor control keys: the control-H, -J, -K, -L keys all correspond to the H, J, K and L keys when vi(m) is in the cursor control mode, leaving them for ordinary alphabetic use when I am not pressing the control key. Similarly for a bunch of other cursor control keys. And control-Q toggles between selecting and not selecting. I've been using this since around Windows 3.11. It is very convenient, and my fingers learned what to do decades ago--they now operate without any intuition whatsoever.
- Sakos 3y agoThat doesn't make it outdated though. It's a happy accident that something developed for a certain set of limitations still has a lot of benefits today without those specific limitations. Who standardized on separate cursor keys? Yes, we have arrow keys, but they're ergonomically worse than anything that lets you stay on the home row. I'll even take the Emacs keys over arrow keys.
- asdajksah2123 3y agoThe mouse and keyboard are also from a time when touchscreens weren't feasible and were the dreams of science fiction. Does that mean the mouse and keyboard are outdated?
- mort96 3y agoSeparate cursor keys are much more intuitive indeed! But people who like Vim don't like it for its intuitiveness. Cursor keys aren't ergonomically located, switching from touch typing to moving the cursor with cursor keys involves a massive hand movement compared to how frequently it's necessary. Using HJKL for movement fits extremely well together with touch typing, and the vim mode switching is more comfortable than moving the hand to the cursor keys. Don't confuse "intuitive" with "ergonomic" or "efficient" or good". They're very often not the same thing.
- dmz73 3y agoThe problem with hjkl as cursor movement in vi is that it cannot be used in all modes so you still have to have and use actual cursor keys. Switching modes just to add a single character before last is annoying. Fixing a typo in filename when saving is impossible without cursor keys. If you have and use real cursor keys then having to remember and use hjkl is just not practical.
- fragmede 3y agoit's not practical to remember four things that are conveniently napped to home row?
- drbaba 3y agoIf I have a typo, I typically Ctrl-W to delete and retype the last word.
- mort96 3y agoMeh I find hitting esc or ^c much easier than moving my hand to the arrow keys and back. Also, many kind of typos can be fixed without entering insert mode! If there's an extra character, I delete it with dl. If a character should've been something else, I use 'r' followed by the letter it should have been. I agree that command mode is more annoying than necessary since it relies on cursor keys to move the cursor.
- orbital-decay 3y ago>The cursor keys being on the home row is just because it happened to be that way on the terminal where vi was invented. We have long since standardized on separate cursor keys, which are more intuitive. Intuitive and convenient are two orthogonal things, I bet that the creators of that terminal put the cursor keys simply because it's convenient to have them on a home row, unlike the creators of the IBM PC keyboard who valued intuitiveness more. I don't see how the ergonomics of typing is outdated. Besides, after all these years HJKL is a common convention already, and can be even more intuitive for many people (not just programmers, but also e.g. roguelike players who usually have the diagonal movement keys around HJKL as well). But that's a bit of a red herring since vi's command language makes the entire single-character cursor movement "outdated" in a sense. The abbreviated commands are highly composable and let you navigate and edit any structured text with the speed of thought. That is the actual value of vi.
- rpdillon 3y agoIt's funny to me that you use the word 'standardized', since one of my biggest gripes with cursor keys is that they're different on every single keyboard layout I use. I'm an emacs user, but I love using letter keys for cursor movement because they're consistent across all keyboards, which helps a lot with my muscle memory.
- mcmoor 3y agoI wonder if there was FPS gamer that used HJKL to move
- likeclockwork 3y agoA left-handed gamer might.
- shric 3y agoLeft handed gamer here. I use wasd with my right hand and the mouse with my left. Life's too short to mess with default key bindings...