4 ms·
Why would you want to disable arrow keys?
by madeofpalk 12y ago
Why would you want to disable arrow keys?
- beaumartinez 12y agoTo to keep your fingers on the home row, in order to have better access to all the other keys in your keyboard. Having your fingers on the arrow keys mean your hand has to travel that much further to type the other keys—making you slower.
- Syssiphus 12y agoIt's not so much about speed. It's about comfort.
- AlexeyBrin 12y agoI've always wondered if the "disable the arrow key" advice given to every VIM novice makes any sense for the user of a 11" - 13" laptop. It was probably a good advice for a classical keyboard, but I find the arrow keys quite handy when I work on a small laptop keyboard.
- Morgawr 12y agoI started seriously using vim around the time I started coding on the go with a very old eeePC (the first model, the absurdly small one). This was around 5-6 years ago probably. Back then I had already used vim before but only as a "normal" text editor, just go into insert mode and move around with arrows. I was forced to use vim because that old piece of crap PC (I still love it though) wasn't powerful enough to run anything, really, and the screen was super small. I noticed using arrows key was super uncomfortable because yes, they were closer to the actual home row but they were also smaller, clunkier and harder to press. So I decided to force myself to use hjkl and disable arrow keys. It was definitely one of the best decisions of my (coding) life. Just comfortably resting your hands on the home row (either laptop keyboard or normal one) simply makes your typing more relaxed and after the couple of weeks (months?) struggling with left/right (up and down was fairly easy) you really stop noticing it. Funnily enough, I re-enabled arrow keys a year or so ago and I haven't really felt the temptation to use them anymore. DISCLAIMER: This turned me into a super slow and awkward typist when I am trying to work on text in an editor that does not support vim mode (like google docs for example). I have several documents around with jjjkkjhjjhjjllljh unfortunately.
- deleted 12y ago[deleted]
- throw_away 12y agoI would argue that it's best to disable arrow keys in insert mode only. This is the real problem here. By using arrow keys in insert mode, the novice ends up using vim just like a glorified notepad, and never truly understanding the different modes. Since they aren't ever going back to command mode, they never consider using more advanced movement operators, and then they never realize the power of composing motions and commands. Whenever I start teaching someone vim, I always add this to their .vimrc: inoremap <Left> <nop> inoremap <Right> <nop> inoremap <Up> <nop> inoremap <Down> <nop> This way, arrows still work as expected in command mode, but not in insert mode. The novice will learn to only insert in insert mode, and move and operate in command mode.