4 ms·
I 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
by rectang 10y ago
I 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.