在VIM中重新映射'd'键时消除延迟 [英] Eliminating lag when remapping 'd' key in VIM

查看:131
本文介绍了在VIM中重新映射'd'键时消除延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是德沃夏克键盘布局,所以我做了一些调整,默认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用户一样. htn可以很好地完成工作,并且反应灵敏.但是,d会滞后一会儿,然后再按原样移动.我认为这是因为有与启动键序列命令(如为删除线),所以VIM等待接收第二笔划的顺序只是一个单一的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>(文本对象后)不工作(后重新映射),所以它们不能导致该问题.有人知道如何摆脱时滞吗?顺便说一句,即使禁用所有插件后,我也有同样的问题.我的vimrc中也没有其他与d的映射.

推荐答案

据我所知,和他们的 经营者待定" 的朋友都没有的真正的映射.这意味着你不能<14>.真的不能避免无副作用延迟你的经验,我相信.

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆