News for hackers. Stuff that matters.
Re:Vim Anti-Patterns by rectang on Wednesday October 05, 2016 @11:35AM (#12644726)
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

Re:Vim Anti-Patterns by vadskye on Wednesday October 05, 2016 @01:21PM (#12645806)
Someone 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.

Re:Vim Anti-Patterns by Lxr on Wednesday October 05, 2016 @11:44AM (#12644828)
Oh god... doesn't this mess with plugins or something?
Re:Vim Anti-Patterns by vadskye on Wednesday October 05, 2016 @01:23PM (#12645831)
Speaking 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...