55 ms·
In vim you can do that by putting these lines into ~/.vimrc: map <up> <nop> map <down> <nop> map <left> <nop> map <right> <nop> imap <up> <nop> ima
by farslan 14y ago
In vim you can do that by putting these lines into ~/.vimrc:
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>
This will disable the arrow keys in normal and insert mode.
- dickfickling 14y agoI'm not trying to be difficult here, just genuinely curious: why disable the arrow keys? Is it simply the speed boost you get from using hjkl on the home row vs moving your hand to the arrows? I use Colemak, so hjkl is very counter-intuitive for me, whereas the arrow keys make sense and aren't /that/ far away. EDIT: http://news.ycombinator.com/item?id=3684515 http://news.ycombinator.com/item?id=3684515 has some good explanations. So does anyone have suggestions for non-QWERTY users? remap the keys that are in the HJKL space, leading to a cascade of keys moved around? Deal with the counter-intuitiveness of actually using HJKL?
- RegEx 14y agoDvorak users can get away with using hjkl with the dvorak layout - it's not that counter-intuitive. Your Colemak layout, however, looks beyond salvageable in terms of using Colemak hjkl. I think a re-binding is in order there.
- koenigdavidmj 14y agoWhen I use Vim I barely even use hkjl except to fine-tune larger movement commands. I'll search for a symbol, or move word-by-word, or use f/F/t/T to move to a different character on a line, which gets me in the ballpark. Even if hjkl is faster, I would be optimising for a case that just doesn't show up that much.