最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

lua - In Neovim, is there a way of set a keybind that allows to hold <leader> and press another key multiple times

programmeradmin3浏览0评论

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.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论