Considering the following example of key binding in nvim init file:
vim.keymap.set(
'n',
'<leader>x',
function()
print('megatron')
end )
Let's assume my leader is space ' '.
If I press x
it works the first time. But I would like to continue to hold down
(space), while I press again x
, printing 'megatron' multiple times. Instead, starting from the second time, it begins to delete chars (as if I would have been pressed only x
).
I would like to know if there is a way to map a function to holding space and press a char multiple times.