diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 40 | ||||
-rw-r--r-- | runtime/doc/msgpack_rpc.txt | 2 | ||||
-rw-r--r-- | runtime/doc/remote.txt | 8 |
3 files changed, 26 insertions, 24 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 3865175a1f..5eb8f62d8b 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1583,7 +1583,9 @@ v:scrollstart String describing the script or function that caused the hit-enter prompt. *v:servername* *servername-variable* -v:servername The resulting registered |x11-clientserver| name if any. +v:servername Default {Nvim} server address. Equivalent to + |$NVIM_LISTEN_ADDRESS| on startup, but may differ if the + latter is modified or unset. |serverstop()| Read-only. @@ -2366,8 +2368,8 @@ char2nr({expr}[, {utf8}]) *char2nr()* char2nr("ABC") returns 65 < When {utf8} is omitted or zero, the current 'encoding' is used. Example for "utf-8": > - char2nr("á") returns 225 - char2nr("á"[0]) returns 195 + char2nr("á") returns 225 + char2nr("á"[0]) returns 195 < With {utf8} set to 1, always treat as utf-8 characters. A combining character is a separate character. |nr2char()| does the opposite. @@ -5374,25 +5376,31 @@ server2client( {clientid}, {string}) *server2client()* Example: > :echo server2client(expand("<client>"), "HELLO") < -serverlist() *serverlist()* +serverlist() *serverlist()* Returns a list of available server names in a list. When there are no servers an empty string is returned. Example: > :echo serverlist() +< *--serverlist* + The Vim command-line option `--serverlist` can be imitated: > + nvim --cmd "echo serverlist()" --cmd "q" +< +serverstart([{address}]) *serverstart()* + Opens a named pipe or TCP socket at {address} for clients to + connect to and returns {address}. If no address is given, it + is equivalent to: > + :call serverstart(tempname()) +< |$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')" < -serverlisten([{address}]) *serverlisten()* - Opens a Unix or TCP socket at {address} for clients to connect - to and returns {address}. If no address is given, it is - equivalent to > - :call serverlisten(tempname()) -< If |$NVIM_LISTEN_ADDRESS| is not set, it will be set to - {address}. - serverstop({address}) *serverstop()* - Closes the Unix or TCP socket at {address}. Does nothing if - {address} is empty, or does not refer to a server. If - {address} equals |$NVIM_LISTEN_ADDRESS|, the listen address - will be unset. + Closes the pipe or socket at {address}. Does nothing if + {address} is empty or invalid. + 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()|. setbufvar({expr}, {varname}, {val}) *setbufvar()* Set option or local variable {varname} in buffer {expr} to diff --git a/runtime/doc/msgpack_rpc.txt b/runtime/doc/msgpack_rpc.txt index b6142e2234..8304d79c17 100644 --- a/runtime/doc/msgpack_rpc.txt +++ b/runtime/doc/msgpack_rpc.txt @@ -81,6 +81,8 @@ There are four ways to open msgpack-rpc streams to nvim: > :echo $NVIM_LISTEN_ADDRESS < + See also |v:servername|. + 4. Through a TCP/IP socket. To make nvim listen on a TCP/IP socket, set the |$NVIM_LISTEN_ADDRESS| environment variable in a shell before starting: > diff --git a/runtime/doc/remote.txt b/runtime/doc/remote.txt index e84b7fc5e9..81ab72a100 100644 --- a/runtime/doc/remote.txt +++ b/runtime/doc/remote.txt @@ -56,11 +56,6 @@ The following command line arguments are available: *--remote-tab-wait-silent* --remote-tab-wait-silent Like --remote-wait-silent but open each file in a new tabpage. - *--servername* - --servername {name} Become the server {name}. When used together - with one of the --remote commands: connect to - server {name} instead of the default (see - below). *--remote-send* --remote-send {keys} Send {keys} to server and exit. The {keys} are not mapped. Special key names are @@ -69,9 +64,6 @@ The following command line arguments are available: *--remote-expr* --remote-expr {expr} Evaluate {expr} in server and print the result on stdout. - *--serverlist* - --serverlist Output a list of server names. - Examples ~ |