我认为jkl;实际上是vi更合适的用法。首先,h 和 l 确实没有那么重要。 w、e 和 b 对于水平导航更加有用。额外的好处是,如果语言需要的话,; 很容易获得。将较弱的手指放在 k 上会很痛,并且您不需要将最强的手指放在 h 上,而应该放在 j 上,因为可能是四个中最常用的。
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.
我以正常的盲打打字员的方式将手放在主排上。我很少使用 h 键进行移动,因为向左移动一个空格通常不是一种有效的移动方式(并且并不真正符合 Vim 的本质)。
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).
虽然我理解 Vim 的理念,即在主行中提供所有运动,但我发现 hjkl 是违反直觉的。我认为一个更加理智的地图应该是一个类似于 wasd 的 ijkl 设置,
nnoremap j h
nnoremap k j
nnoremap i k
我发现这非常容易自然地导航。
j:left
i:up
k:down
l:right
为了切换进入/退出插入/正常模式,我个人使用 Alt-e 因为我几乎总是使用 Gvim 并且不必担心某些终端存在 Alt 问题。
nnoremap <A-e> i
inoremap <A-e> <esc>l
While I understand Vim's philosophy of having all the movement available in the home row, I found hjkl to be counter intuitive. A much more saner map I thought would be a wasd-like setup with ijkl
nnoremap j h
nnoremap k j
nnoremap i k
I found this to be very easy to navigate with very natrually.
j:left
i:up
k:down
l:right
For toggling in/out of insert/normal mode, I personally use Alt-e since I almost always use Gvim and not have to worry that some terminals have issues with Alt.
发布评论
评论(5)
我认为
jkl;
实际上是vi更合适的用法。首先,h
和l
确实没有那么重要。w
、e
和b
对于水平导航更加有用。额外的好处是,如果语言需要的话,;
很容易获得。将较弱的手指放在k
上会很痛,并且您不需要将最强的手指放在h
上,而应该放在j
上,因为可能是四个中最常用的。I think that
jkl;
is actually the more appropriate usage for vi. For one,h
andl
really don't matter that much.w
,e
, andb
are significantly more useful for horizontal navigation. As a bonus,;
is easy to get at if the language requires it. Having a weaker finger onk
hurts, and you don't need your strongest finger on theh
, when it should be on thej
which is probably the most used of the four.。
前两个解决方案都不是 100% 令人满意 我提出第三种方法,一种结合了两全其美的方法
我的建议:“下-上-左-右”
保持上/下在原处,然后进行第三个和第三个。第四根手指左 & right
然后,为了避免覆盖基本的 Vim 功能:将 ; 上以前的内容扔到现在空的 h 按钮上
作为一个可爱的奖励, “l”键现在代表“左”;)
The previous "runners-up", who both use "left-down-up-right" layout:
选择 1:“hjkl”
@alternative 的推荐。键绑定保持默认 (hjkl),右手 保持在主行 (jkl;)
选择2:“jkl;”
将这 4 个绑定滑到 1 上,以便它们位于主行:
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" ;)
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:
我以正常的盲打打字员的方式将手放在主排上。我很少使用 h 键进行移动,因为向左移动一个空格通常不是一种有效的移动方式(并且并不真正符合 Vim 的本质)。
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).
据我所知,
hjkl
的使用是出于历史原因(即 这就是为什么 vim 使用 hjkl 键作为方向键),这并不是基于任何人体工程学原理。我个人更喜欢遵循 i3 窗口管理器 推荐的方法,如 为什么默认配置使用jkl;而不是 hjkl? 是符合人体工程学的选择。
检查 vim 重新映射 hjkl 到
jkl;
I understand, that
hjkl
is used for historic reasons (i.e. Here is why vim uses the hjkl keys as arrow keys) and it is not based on any ergonomic rationale.I personally prefer to follow the approach recommended by i3 window manager which as explained in the FAQ on Why does the default config use jkl; instead of hjkl? is an ergonomic choice.
Check this on vim remapping the hjkl to
jkl;
虽然我理解 Vim 的理念,即在主行中提供所有运动,但我发现
hjkl
是违反直觉的。我认为一个更加理智的地图应该是一个类似于 wasd 的 ijkl 设置,我发现这非常容易自然地导航。
为了切换进入/退出插入/正常模式,我个人使用
Alt-e
因为我几乎总是使用 Gvim 并且不必担心某些终端存在 Alt 问题。While I understand Vim's philosophy of having all the movement available in the home row, I found
hjkl
to be counter intuitive. A much more saner map I thought would be a wasd-like setup withijkl
I found this to be very easy to navigate with very natrually.
For toggling in/out of insert/normal mode, I personally use
Alt-e
since I almost always use Gvim and not have to worry that some terminals have issues with Alt.