Vim:以前的按键速度太快,不能映射多个键

时间:2017-12-29 06:00:26

标签: vim nerdtree

我只是在我的.vimrc文件中设置了此键映射,但是在按下设置为/的引导键后,它几乎立即消失,因此很难按下f是时候切换NerdTree了。

nmap <Leader>f  <plug>NERDTreeTabsToggle<CR>

与等待第二把钥匙的dd无关。

有什么地方我可以放慢速度吗?

1 个答案:

答案 0 :(得分:2)

执行以下命令:

:set notimeout
:set ttimeout

有关更多信息,请查看vim手册:

'timeout'    'ttimeout'     action
  off         off           do not time out
  on          on or off     time out on :mappings and key codes
  off         on            time out on key codes

- 来自:help timeout

另一种解决方案

如果您只想增加领导密钥的延迟,可以执行以下操作:

set timeoutlen=3000

此处,3000表示3秒,可以设置为更大的值。