1

I'm in neovim command mode and press x on keyboard.

What is the best way a python remote plugin can react to this keypress?

What to do if the plugin should react to several different keys?

Here is my setup: Neovim is started like this:

NVIM_LISTEN_ADDRESS=/tmp/nvim nvim

remoteplugin.py is:

from neovim import attach
nvim = attach('socket', path='/tmp/nvim')
def mycallback():
    //react on 'x' keypress

I frankly didn't understand the suggestion on the neowiki pages

while true
    handle(next_vim_event())

What would be the corresponding python code?

3

Browse other questions tagged or ask your own question.