server: introduce --listen, deprecate $NVIM_LISTEN_ADDRESS

This commit is contained in:
Justin M. Keyes
2018-04-08 17:20:25 +02:00
parent 7362ca4430
commit 507bda1c95
8 changed files with 80 additions and 49 deletions

View File

@@ -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|.

View File

@@ -1788,11 +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 Primary listen address of the current Nvim instance, the first
item returned by |serverlist()|. Can be set by
|--listen| or |$NVIM_LISTEN_ADDRESS| on startup.
See also |serverstart()| and |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.

View File

@@ -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,

View File

@@ -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*