diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-04-11 03:29:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-11 03:29:18 +0200 |
commit | f96d99ad1118d79ae5c38bb5e2c4be1280caa3cc (patch) | |
tree | e5676f34610bafc482179f8c17f45314d2d33acb /runtime | |
parent | 84bac9f507e3258c574cfc91ce64889a2e125d46 (diff) | |
parent | 777d34ec376ee8706a80d4f1f44fb83397753116 (diff) | |
download | rneovim-f96d99ad1118d79ae5c38bb5e2c4be1280caa3cc.tar.gz rneovim-f96d99ad1118d79ae5c38bb5e2c4be1280caa3cc.tar.bz2 rneovim-f96d99ad1118d79ae5c38bb5e2c4be1280caa3cc.zip |
Merge #8247 'server: introduce --listen'
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/deprecated.txt | 4 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 24 | ||||
-rw-r--r-- | runtime/doc/msgpack_rpc.txt | 5 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 4 |
4 files changed, 18 insertions, 19 deletions
diff --git a/runtime/doc/deprecated.txt b/runtime/doc/deprecated.txt index ea61e847c7..03699b3dfb 100644 --- a/runtime/doc/deprecated.txt +++ b/runtime/doc/deprecated.txt @@ -22,6 +22,10 @@ Commands ~ *:wv* *:wviminfo* Deprecated alias to |:wshada| command. +Environment Variables ~ +*$NVIM_LISTEN_ADDRESS* Deprecated in favor of |--listen|. If both are given, + $NVIM_LISTEN_ADDRESS is ignored. + Events ~ *EncodingChanged* Never fired; 'encoding' is always "utf-8". *FileEncoding* Never fired; equivalent to |EncodingChanged|. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 767fc133d8..11c4b62403 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1788,9 +1788,9 @@ v:scrollstart String describing the script or function that caused the hit-enter prompt. *v:servername* *servername-variable* - *$NVIM_LISTEN_ADDRESS* -v:servername Default Nvim server address. Equivalent to - |$NVIM_LISTEN_ADDRESS| on startup. |serverstop()| +v:servername Primary listen-address of the current Nvim instance, the first + item returned by |serverlist()|. Can be set by |--listen| or + |$NVIM_LISTEN_ADDRESS| at startup. |serverstart()| |serverstop()| Read-only. @@ -6638,15 +6638,11 @@ server2client({clientid}, {string}) *server2client()* :echo server2client(expand("<client>"), "HELLO") < serverlist() *serverlist()* - Returns a list of available server names in a list. - When there are no servers an empty string is returned. + Returns a list of server addresses, or empty if all servers + were stopped. |serverstart()| |serverstop()| Example: > :echo serverlist() -< {Nvim} *--serverlist* - The Vim command-line option `--serverlist` was removed from - Nvim, but it can be imitated: > - nvim --cmd "echo serverlist()" --cmd "q" -< + serverstart([{address}]) *serverstart()* Opens a socket or named pipe at {address} and listens for |RPC| messages. Clients can send |API| commands to the address @@ -6674,13 +6670,9 @@ serverstart([{address}]) *serverstart()* < |$NVIM_LISTEN_ADDRESS| is set to {address} if not already set. - *--servername* - The Vim command-line option `--servername` can be imitated: > - nvim --cmd "let g:server_addr = serverstart('foo')" -< serverstop({address}) *serverstop()* - Closes the pipe or socket at {address}. Does nothing if - {address} is empty or invalid. + Closes the pipe or socket at {address}. + Returns TRUE if {address} is valid, else FALSE. If |$NVIM_LISTEN_ADDRESS| is stopped it is unset. If |v:servername| is stopped it is set to the next available address returned by |serverlist()|. diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt index 11fad105b5..01d4e10cea 100644 --- a/runtime/doc/msgpack_rpc.txt +++ b/runtime/doc/msgpack_rpc.txt @@ -70,9 +70,8 @@ An rpc socket is automatically created with each instance. The socket location is stored in |v:servername|. By default this is a named pipe with an automatically generated address. See |XXX|. -To make Nvim listen on a TCP/IP socket instead, set the - |$NVIM_LISTEN_ADDRESS| environment variable before starting Nvim: > - NVIM_LISTEN_ADDRESS=127.0.0.1:6666 nvim +To make Nvim listen on a TCP/IP socket instead, specify |--listen|: > + nvim --listen 127.0.0.1:6666 <Also, more sockets and named pipes can be listened on using |serverstart()|. Note that localhost TCP sockets are generally less secure than named pipes, diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index e9188ba641..991f88f7b6 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -355,6 +355,10 @@ argument. instead. See also |silent-mode|, which does start a (limited) UI. +--listen {addr} *--listen* + Start |RPC| server on socket or TCP address {addr}. Sets the + primary listen address |v:servername| to {addr}. |serverstart()| + ============================================================================== 2. Initialization *initialization* *startup* |