在 Vim 中延迟按键序列超时的方法? [英] Way to delay the timeout of key sequences in Vim?

查看:33
本文介绍了在 Vim 中延迟按键序列超时的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和大多数 Vim 用户一样,喜欢为普通模式映射组合键以提高工作效率.它们通常以主键开始.

I, like most Vim users, like mapping key combinations for normal mode to increase productivity. They usually start with the leader key.

但是当我尝试新的映射并且我还不习惯它们时,我输入它们有点慢.按键之间的小延迟不仅会使序列失败,还会触发不需要的命令(例如,无法键入引导符,然后 f 离开我并按下 f 键,因此光标将跳转到下一个出现的字符 I按下一步).

But when I'm trying new mappings and I'm not yet used to them, I am a little slow at typing them. That little delay between key presses not only makes the sequence fail, it also triggers unwanted commands (for example failing to type the leader, then f leaves me with the f key pressed, so the cursor will jump to the next occurrence of the character I press next).

有没有办法延迟按键序列的超时时间?

Is there a way to delay the timeout for key sequences?

我不知道它是否相关,但是

I don't know if it's relevant, but

:set updatetime

节目

updatetime=4000

但是leader key的效果持续时间不到4秒.

but the leader key effect lasts for a lot less than 4 seconds.

推荐答案

set updatetime 是 Vim 在你什么都不做时等待它把交换文件写入磁盘的时间 (:help updatetime).

set updatetime is the time Vim waits until it writes its swapfile to disk when you do nothing (:help updatetime).

正确的设置是set timeoutlen (:help timeoutlen).

这篇关于在 Vim 中延迟按键序列超时的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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