Open reem opened 4 years ago
Is this a feature in vanilla vim?
EDIT: implementation https://github.com/reem/Vim/tree/split-timeouts
Feel free to submit a PR!
Any updates on this?
In my init.lua I usually do something like this, but I'm afraid this is not possible in VSCode Vim
vim.api.nvim_create_autocmd('InsertLeave', {
desc = 'Remove timeout when leaving insert mode',
callback = function()
vim.opt.timeout = false
end,
})
vim.api.nvim_create_autocmd('InsertEnter', {
desc = 'Add short timeout when entering insert mode',
callback = function()
vim.opt.timeoutlen = 100
vim.opt.timeout = true
end,
})
Is your feature request related to a problem? Please describe. Multi-key normal mode remappings have to be entered quickly because they share a timeout with insert mode remappings where it's desirable to have a shorter timeout.
Describe the solution you'd like Allow setting a 2nd timeout that only applies either:
Describe alternatives you've considered Alternatively allow setting a different timeout for every mode, but that may be overkill.
Additional context I have implemented this feature already in a non-backwards compatible way, replacing
configuration.timeout
withconfiguration.insertModeTimeout
andconfiguration.otherModesTimeout
. Would be happy to get the change upstreamed in a backwards compatible way, let me know what your thoughts are.EDIT: implementation https://github.com/reem/Vim/tree/split-timeouts