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

What would be the corresponding python code?


Browse other questions tagged or ask your own question.