4 ms·
I wonder why every attempt at copying vi's concept, which is reasonable, also ends up copying its keybinding from the 70s. I'm not talking about hjkl, but rath
by teo_zero 2y ago
I wonder why every attempt at copying vi's concept, which is reasonable, also ends up copying its keybinding from the 70s.
I'm not talking about hjkl, but rather y for yank, p for put, d for delete, u for undo... where today every other software adopts a different vocabulary, namely x for cut, c for copy, v for paste, z for undo, etc.
- mathstuf 2y agoIMO, it's because mnemonics make more sense than QWERTY keyboard placement. Of course, there are exceptions even in Vim (e.g., ^E and ^Y for viewport scrolling), but bindings to value rather than pointer for things make it easier for those with alternate layouts (very few apps use scancode rather than keycodes for bindings, but they are possible such as GNOME's Alt+<key above Tab> for same-app window switching).
- atiedebee 2y agoI think those bindings are fine, what is more problematic to me is the inconsistencies or straight up arbitrary mappings (gg and G come to mind). I feel like kakoune did a great job at improving vims bindings to make more sense.
- deleted 2y ago[deleted]
- tliltocatl 2y agoSpeaking of 70s, my personal showstopper for vi isn't mode switching (actually, quite convenient). It's the cursor being on top of a symbol, rather then between symbols, so you need to mind when to 'i' and when to 'a'. And no, virtual spaces doesn't change much, the whole editing model is built around it.
- cess11 2y agoIt's the terminal that controls the cursor. You can tell vim to change it and have a vertical bar in insert mode and a block otherwise if you want. By default you just get what your terminal does.
- tliltocatl 2y agoTerminal is just the display, I'm talking about editor model. Even if the cursor is displayed as vertical bar, vi would still models it on-symbol and switching between modes will move it sometimes inconsistently. Well explained here: https://www.reddit.com/r/vim/comments/99h4le/comment/e4nsx0m/ https://www.reddit.com/r/vim/comments/99h4le/comment/e4nsx0m...
- cess11 2y agoReddit doesn't like my network and I won't dig up some proxy they prefer. You can describe an incantation that will "move it sometimes inconsistently" instead.
- tliltocatl 2y agoMy personal take is just you have to remember what you did last to choose between "a" and "i". If you do i123<Esc>iabc, you get "12abc3" rather then "123abc". And then as the link says: - <Esc> moves to the left [...] but if you do i_Ctrl-O or i_Ctrl-\_Ctrl-O [...] it moves to the right!! - An empty line still allows normal mode to have a cursor, but since there are zero characters this cursor is kind of “fake”.
- cess11 2y agoNone of those are inconsistent. If a is confusing for you, use i, A and o, that'll be enough for most things you want. Most of the time you'll drop into insert mode through cw, cib and the like anyway. What do you mean by empty lines? Does your vim somehow have lines in the buffer that aren't in the file?
- tliltocatl 2y ago\n\n
- cess11 2y ago
- usrbinbash 2y agoI don't see how that is a problem, given how trivially easy most of these editors make it to rebind keys.
- opan 2y agoCUA bindings are very QWERTY-centric, which feels even more dated to me. The mnemonic style binds remain more equal across layouts. In the case of p, there's also P, so you'd likely lose half the functionality trying to force it into the CUA style. I guess you could use ctrl-shift-v, but that tends to be "paste without formatting". I grew up mostly with Windows and CUA, and I still became a big fan of vim.
- marssaxman 2y agovim bindings are even more QWERTY-centric, no? That's why I skipped it after a brief look, many years ago: having to memorize a lot of unfamiliar key commands was bad enough, but coming at it as a lifelong Dvorak user, the keys also seemed to be scattered incoherently all over the keyboard.
- opan 2y agoNo, just hjkl, which are not used that much when you have better options like e, w, b, }, etc. A lot of people make a big deal about hjkl in other layouts, but speaking from experience going from qwerty to dvorak to workman, it's not a big deal, and I don't rebind it. They're just letters ho be pressed, same as when you type them for spelling words, which you're already working hard to relearn when changing layouts. I think it's very doable. Also, for dvorak in particular, it reminds me of those RC car controllers that split up the horizontal and vertical movement between your hands. It's the same with dvorak. H is left of L, both right hand, that's your left/right. J and K are right beside each other (and in same left to right order as qwerty), there's your down and up. Workman is a lot more nonsensical by comparison with all but h on right hand and j above k, but it doesn't bother me.
- teo_zero 2y agoNo need for Ctrl: imagine simply mapping p to v and P to V.
- opan 2y agoI use visual mode quite a bit. Unsure if I use it or pasting more, honestly.