在VIM中重新映射'd'键时消除延迟 [英] Eliminating lag when remapping 'd' key in VIM
问题描述
我使用的是德沃夏克键盘布局,所以我做了一些调整,默认VIM mappings--一个改变我做了被重新映射右侧母排键
I use a Dvorak keyboard layout, and so I've made a few adjustments to the default VIM mappings-- one change I've made is to remap the right-side home row keys to
noremap d h
noremap h j
noremap t k
noremap n l
这样就可以方便地定位移动键,就像QWERTY用户一样. h
,t
和n
可以很好地完成工作,并且反应灵敏.但是,d
会滞后一会儿,然后再按原样移动.我认为这是因为有与启动键序列命令
So that movement keys are conveniently positioned, as they would be for a QWERTY user. h
, t
, and n
do their job fine and are very responsive. d
, however, lags for a moment before moving left the way its supposed to. I think this is because there are key-sequence commands that start with d
(like dd
for delete line), so VIM is waiting to receive the second stroke in the sequence before executing the command for just a single 'd'. I've remapped dd
:
noremap dd hh
但是,这是不是做的伎俩.然而,对于像命令<7>或<8>(文本对象后d
的映射.
推荐答案
据我所知,
AFAIK, d
, c
and their "operator pending" friends are not really mappings. This means that you can't :unmap d
. The delay you experience can't really be avoided without side effects, I believe.
您可能希望与
You might want to play with :h timeout
and :h timeoutlen
.
有关它的价值,替代布局/Vim的故事......复杂. 而且根本没有解决.
For what it's worth, the alternative layouts/Vim story is… complicated. And not settled at all.
这篇关于在VIM中重新映射'd'键时消除延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!