4 ms·
I don’t really understand. Many of the common bindings in Vim use modifiers. How do you navigate back a word without a modifier? Do you just exit editing mode l
by doctor_eval 3y ago
I don’t really understand. Many of the common bindings in Vim use modifiers. How do you navigate back a word without a modifier? Do you just exit editing mode like in the old days? Do you just forgo this and arrow back?
In case it’s not clear from my tone, I’m totally sympathetic to relieving injury, and whatever works, works. I just don’t understand how Vim bindings help, and am genuinely curious.
- cryptonector 3y ago> Do you just exit editing mode like in the old days? Yes! I very much do. I do not use the arrow keys for cursor movement in edit mode.
- mst 3y agoIn fact, it got to the point where I realised I was only ever hitting the arrow keys by accident while in insert mode so my vimrc now contains: inoremap <Left> <NOP> inoremap <Right> <NOP> inoremap <Up> <NOP> inoremap <Down> <NOP> (the rest is at https://trout.me.uk/X11/vimrc https://trout.me.uk/X11/vimrc)
- gsinclair 3y agoNavigating back a word while in insert mode is just unnecessary. The purpose of insert mode is to insert text, and that’s it. This occupies a very small proportion of total editing time.
- doctor_eval 3y ago> Navigating back a word while in insert mode is just unnecessary. Speak for yourself! I do it all the time. Navigating by word is my primary means of moving through a line. Maybe that’s why I’m happy to be free of vi. It was my primary editor for at least 10 years. And I’m happy to see the back of it.
- wander_homer 3y agoCan you provide a concrete example, like a piece of text with the current cursor position, the outcome you want to achieve and the sequence of shortcuts you're using to achieve that with your favorite text editor? > Navigating by word is my primary means of moving through a line. So how does your new editor do that more efficiently than pressing <Esc> once, followed by pressing <w> or <b> once for each word?
- doctor_eval 3y agoNavigating by word is a matter of holding the Option key and pressing left or right arrow. Same number of keys, but works pretty much everywhere. The box used to enter this comment, for example. Just to be super clear, I don’t care what other people do. Go nuts with vi bindings. I was just agreeing with what someone else said, that vi bindings aren’t peak UI and that “hacker” != “vi”
- wander_homer 3y agoNo, you suggested that leaving insert mode to navigate by words is somehow less efficient (since navigating by word is your primary way to navigate in lines) and that maybe that's why you're happy you stopped using vi. Now we found out that leaving insert mode to navigate by words requires the "same number of keys", so @gsinclair was right and it is unnecessary to stay in insert mode for navigation. > Same number of keys, but works pretty much everywhere. The box used to enter this comment, for example. If efficient word navigation was the only thing vim key bindings had to offer I wouldn't be using them. But they do offer many things the current text box does not offer and since (as a programmer) I'm spending 95% of my time in an IDE and not some browser text box, I'll gladly accept some inconsistencies if that means editing and navigating in my IDE becomes more pleasant.
- deleted 3y ago[deleted]
- cryptonector 3y ago^W enters the chat :)
- doctor_eval 3y agoSo you know what I find super weird is that - despite my other comment to you earlier about using vi since the early 90s - I can’t actually name the key bindings for vi with much certainty. I’ve been using it for so long that apparently the muscle memory is the only memory I have. I mean thinks like yy and p and ZZ sure, but for navigation I know where on the keyboard it is - but not the keys. (At least not while I’m using an iPhone keyboard) Aren’t brains weird?
- cryptonector 3y agoAh, I forgot some context: I use sticky keys, so for me shift is not a problem, but I still have bad habits from before discovering sticky keys so control and other modifiers -and especially multi-modifier combinations- are still a problem for me, and vi doesn't use that many of those.
- doctor_eval 3y agoThanks for the context. It’s great that vi bindings help you. Is it fair to think of it as a assistive technology in your case? Do you know others in your situation who use vi bindings? I was definitely on team vi in the Great Emacs Wars, but it’s not my preferred way of editing any more. Nevertheless it’s something that I know quite well, and this conversation has really opened my eyes to the idea that this sort of thing can help people.
- cryptonector 3y ago> Is it fair to think of it as a assistive technology in your case? I started with vi eons ago because it was easier to use it remotely to do my school work than it was to walk into the labs and use a graphical editor. The habit stuck -- vi has a steep learning curve, but it's also habit forming, so to a large degree I use vi because of the habits I developed. However, when pain from ulnar deviations began to set in I had to experiment and research to find something that worked, and that was sticky keys, and I've not been in pain since. The fact that I didn't have to give up vi certainly says something, namely: that vi wasn't the cause of the injury. But also now that I understand what caused the pain (ulnar deviation), I shudder to think of using emacs. > Do you know others in your situation who use vi bindings? I do not, though I do very much recommend using sticky keys. I have taught my son how to use vi and he loves it. Like I said, vi is habit forming, but good habit forming :)
- doctor_eval 3y agoHey that’s great. I often worry about what I would do if I can’t code any more. It would be very hard. I’ve used vi since at least the early 1990s. I still use it today, but I really do prefer a non modal approach to editing and always have. That said, of course, I wouldn’t be caught dead using nano :P