Vim users, where do you rest your right hand?
Longtime vim users, do you keep your fingers on jkl;
or hjkl
in normal mode?
Standard touch typing teaches us the home position for the right hand has the index finger on the j
key, so your fingers are on jkl;
.
But standard vim motion keys are hjkl
.
I'm getting back into vim after 10+ years (omg, I got old when I wasn't paying attention) and find myself gravitating towards hjkl
... but that makes it harder to type upper-right letters, braces, etc. I'd like to train myself to use the most efficient/pragmatic method now instead of having to re-train later.
Longtime, hardcore vim users, what's the best practice?
Note:
I think that jkl;
is actually the more appropriate usage for vi. For one, h
and l
really don't matter that much. w
, e
, and b
are significantly more useful for horizontal navigation. As a bonus, ;
is easy to get at if the language requires it. Having a weaker finger on k
hurts, and you don't need your strongest finger on the h
, when it should be on the j
which is probably the most used of the four.
Intro
Neither of the previous 2 solutions was 100% satisfactory. I propose a 3rd way, one that combines the best of both worlds
My Recomendation: "down-up-left-right"
Keep up/down where they are, then make 3rd & 4th fingers left & right
Then, to avoid overwriting base Vim features: Toss whatever used to be on ; to the now-empty h button
As a cute bonus, the " l " key now stands for " left " ;)
noremap lh
noremap ; l
noremap h ;
The previous "runners-up", who both use "left-down-up-right" layout :
Choice 1: "hjkl"
@alternative's recommendation. Keybinds stay default ( hjkl ), right hand stays on home row ( jkl; )
Choice 2: "jkl;"
Slide those 4 binds over 1 so they sit on the home row:
noremap ; l
noremap lk
noremap kj
noremap jh
I keep my hands on the home row, in the normal touch-typist manner. Rarely do I use the h key for movement, as moving one space to the left is not usually an efficient way to move (and does not really fit the essence of Vim).
链接地址: http://www.djcxy.com/p/8704.html上一篇: 退出后,如何在VIM中保存撤消历史记录?
下一篇: Vim用户,你在哪里休息你的右手?