A neovim plugin for binding custom commands to keystrokes and running them in a scratch buffer.
- Install using your plugin manager (vim-plug in this example)
Plug 'nvim-lua/plenary.nvim' " dependency
Plug 'motobep/bind-runner'
- In your vimrc
lua require('bind-runner')
- In your init.lua
require('bind-runner')
Run :BindRunner in vim command line, enter your command and the desired key that will trigger the command.
If the key is not specified, <F5> is used as a default one.
Example:
BindRunner prompt
Command: echo hi
Key:
Default key is used: <F5>
Then hit the key to run your custom command.