neovim-remote v1.4.0
Upgrade: pip3 install -U neovim-remote
A few bugs were fixed and the documentation was polished a lot. The main changes were..
Read from stdin
The following does exactly what you expect it to do:
$ cat file | nvr -o -
$ echo "foo\nbar" | nvr --remote-wait -
Quit using the same exit code as nvim
nvr --remote-wait file
and then :cquit
in nvim will make nvr quit with exit code 1.
This only works if your nvim is recent enough. Otherwise nvr will always quit with 0.
Expose b:nvr
Imagine nvr --remote-wait file
. The buffer that represents "file" in nvim now has a local variable b:nvr
. It's a list of channels for each connected nvr process.
If we wanted to create a command that disconnects all nvr processes with exit code 1:
command! Cquit
\ if exists('b:nvr')
\| for chanid in b:nvr
\| silent! call rpcnotify(chanid, 'Exit', 1)
\| endfor
\| endif