Remap Vim keys to avoid RSI in left hand

I always suffered from RSI in my left wrist (see here) and I thought it was because of the twisting motion associated with hitting the ctrl and shift keys. Therefore, I went ahead and bought an Advantage Kinesis keyboard shown below:

在这里输入图像描述

However, even with this keyboard, and foot pedals, and mapping the shift key to the Back Space, I still have RSI, again only in my left hand. Then it occoured to me, a great deal of the movement keys are associated with left hand. Here is a non exhaustive list of the things on the right hand, and then the left hand.

Right Hand:

  • p a simple paste statement, almost always used on its own
  • o write above/below current line, almost always used on its own
  • i write at cursor, almost always used on its own
  • u undo, almost always used on its own
  • y yank, used with a motion command, but only a few motion specifiers on right side (ie. ( , ) , i ...)
  • h , j , k , l , single character motion, seldom used.
  • Now observe

    Left Hand:

  • w , e , b motion one word. Very often used with a number, or pressed multiple times.
  • t , f , $ all combined with keys like y , d , or v
  • Ctrl w + h , j , k , or l , for moving windows, and requires a jerking motion with your left hand.
  • Ctrl x Ctrl f omni completion (IIRC)
  • Ctrl f Ctrl g find file under cursor
  • Now I am sure this is a biased list, but it gets my point across that a great deal of the commonly used motion keys and a few other difficult combinations are situated on the left hand side of the keyboard.

    My question is this, is there a non reinventing-the-wheel way to do this? For example are there any libararies that do this? If not, if I switch to DVORAK will this solve any of the problems I mentioned?


    To answer your Dvorak question about the keys you mentioned:

    p, o, i, u, y, j, k, e, $, x are typed with the left hand. h, l, (, ), w, b, t, f, d, v, w, g are typed with the right hand.

    So looking at what moves where:

    Stay on Left  |    Move to Left   |  Move to Right   |  Stay on Right    
    ----------------------------------------------------------------------    
    e $ x         |   p o i u y j k   |  w b t f d v w g |  h l ( )
    

    They keys you use are still mostly evenly distributed between left and right hands, but most of the solo-keys are now left-hand, and most of the chorded sequences are right-hand.

    Also, the process of learning Dvorak will slow you down significantly, which can help to reduce the strain on your wrists while you make the transition.

    You can enter a sample of what you regularly type into websites like http://patorjk.com/keyboard-layout-analyzer/ , and see how much more or less distance your fingers have to travel under different keyboard layouts. (There are other neat metrics to look at, too. Click the tabs on the left and explore!)


    I don't like the control keys either so I remapped the most used ones to <space> .

    Example:

    nnoremap <C-W> <space>w
    

    So instead of doing Ctrl+Wh, I do Spacewh, and it works really well.

    链接地址: http://www.djcxy.com/p/49482.html

    上一篇: 独立于Vim版本的Undofile

    下一篇: 重新映射Vim键以避免左手的RSI