neovim icon indicating copy to clipboard operation
neovim copied to clipboard

vim.on_key does not expose a way to only trigger on completion of a valid action

Open xiaoshihou514 opened this issue 4 months ago • 4 comments

Problem

I am trying to collect keystroke statistics like somebody did in emacs, however, there is no way to make actions like ci[ to be sent to vim.on_key together. Instead, the function will be triggered 3 times, with c, i and [.

Expected behavior

The ability to write

vim.on_key(f, {
  ns = nil,
  on_action_complete = true
})

... and get ci[ sent to f!

xiaoshihou514 avatar Oct 13 '24 18:10 xiaoshihou514