4 ms·
I don't really disagree with your overall point, the arrows keys are not horrible, but I think for beginners removing all arrow keys is the best approach. I use
by DSMan195276 10y ago
I don't really disagree with your overall point, the arrows keys are not horrible, but I think for beginners removing all arrow keys is the best approach. I used vim for a while just relying on the arrow keys, and it wasn't until I disabled them completely that I really started to use vim. If I left them on in insert mode, I would have just ended up using them that way, just due to muscle memory.
I'd also add that if you remap Esc to something more manageable, leaving insert mode for a second to move around starts feeling a lot more natural. I still do get where you're coming from, the arrow keys do have a time and place. But since I do all of my moving around in normal mode, leaving insert mode to do it just 'makes sense' now and I really don't even have to think about it.
- yes_or_gnome 10y agoAbsolutely agree. I completely disabled arrow keys for a short time; ~3 months. It started out after reading a similar recommendation. It was difficult for a few days, but then I completely forgot about my arrow keys and the fact that I disabled them. It wasn't until months later that I was in one of these situations that I wanted to use the arrow keys, but they didn't work. Which was confusing. This must have been around the time that I started to understand, and manicure, my vimrc because I remember having to learn all the mapping modes to recover arrow keys for Insert Mode. So, anecdotally, completely disabling arrow keys led me to learn more Vim than just efficient movement. Today, though, I don't have the makings anymore because it's no longer a problem. One quick question; I can't answer this because I am currently commuting. Does 'noremap' disable keys in Command Mode? Now, that would be aggregating, to me. Also, there a remap mode that combines Normal and Visual modes (right?), that would be one better than 'nnoremap'.
- rectang 10y agoI tried and failed to make myself use `hjkl` instead of the arrow keys. It was a perpetual hindrance to my brain that up (`k`) and down (`j`) did not spatially reinforce their functions. What ultimately worked was to map the triangle `ijkl` like you normally see `wasd` in games. i jkl i -- up k -- down j -- left l -- right I then added two more keys beyond left and right to skip forward and back by words. i hjkl; h -- skip backward to the beginning of a word (ordinarily `b`) ; -- skip forward to the end of a word (ordinarily `e`) There were some echo effects since I had to replace `i`, but they were manageable. On machines where I don't have my vimrc available I'm still functional, just clumsy. It was definitely worth it. My vimrc: https://github.com/rectang/dotfiles/blob/master/vimextra https://github.com/rectang/dotfiles/blob/master/vimextra
- Lxr 10y agoOh god... doesn't this mess with plugins or something?
- vadskye 10y agoSpeaking as someone with a similar setup, I've never had many issues with plugins assuming the use of hjkl. The only one I can think of offhand that has issues is indent-object. The thing that really causes issues is my attempt to swap the roles of [ and {, using [] to jump between paragraphs and {} to do fancy function jumping. Vim plugins really don't like that...
- vadskye 10y agoSomeone else has found the wisdom of ijkl! :D My setup uses "u" and "o" the same way you use "h" and ";". I also extended it so you can use modifiers on I and K to get page up/page down behavior, or to navigate between indentation levels.
- godshatter 10y agoI've tried not using the arrow keys, but my problem is that I use the dvorak layout at home, and typing jcvp to maneuver around (what hjkl maps to) confuses me too much. Especially since I use vim at work as well on the normal qwerty layout. Maybe I'll try again soon. In the meantime, I'll try to incorporate *, #, and gi into my muscle memory (for both layouts). The dvorak layout (and especially switching layouts) saved me from a lot of pain, so I don't plan on ditching it any time soon.