mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
doc: update msgpack_rpc documentation to use nvim as variable name #1470
This commit is contained in:
parent
3b8661745b
commit
06e5c2c063
@ -107,14 +107,14 @@ string 'hello world!' on the current nvim instance:
|
|||||||
require 'msgpack/rpc'
|
require 'msgpack/rpc'
|
||||||
require 'msgpack/rpc/transport/unix'
|
require 'msgpack/rpc/transport/unix'
|
||||||
|
|
||||||
vim = MessagePack::RPC::Client.new(MessagePack::RPC::UNIXTransport.new, ENV['NVIM_LISTEN_ADDRESS'])
|
nvim = MessagePack::RPC::Client.new(MessagePack::RPC::UNIXTransport.new, ENV['NVIM_LISTEN_ADDRESS'])
|
||||||
result = vim.call(:vim_command, 'echo "hello world!"')
|
result = nvim.call(:vim_command, 'echo "hello world!"')
|
||||||
<
|
<
|
||||||
A better way is to use the python REPL with the `neovim` package, where API
|
A better way is to use the python REPL with the `neovim` package, where API
|
||||||
functions can be called interactively:
|
functions can be called interactively:
|
||||||
>
|
>
|
||||||
>>> import neovim; vim = neovim.connect('[address]')
|
>>> import neovim; nvim = neovim.connect('[address]')
|
||||||
>>> vim.command('echo "hello world!"')
|
>>> nvim.command('echo "hello world!"')
|
||||||
<
|
<
|
||||||
==============================================================================
|
==============================================================================
|
||||||
4. Implementing new clients *msgpack-rpc-clients*
|
4. Implementing new clients *msgpack-rpc-clients*
|
||||||
|
Loading…
Reference in New Issue
Block a user