aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/eval.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/eval.txt')
-rw-r--r--runtime/doc/eval.txt26
1 files changed, 19 insertions, 7 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
index b68c70bf9f..7512cf78ba 100644
--- a/runtime/doc/eval.txt
+++ b/runtime/doc/eval.txt
@@ -6531,15 +6531,27 @@ serverlist() *serverlist()*
nvim --cmd "echo serverlist()" --cmd "q"
<
serverstart([{address}]) *serverstart()*
- Opens a TCP socket (IPv4/IPv6), Unix domain socket (Unix),
- or named pipe (Windows) at {address} for clients to connect
- to and returns {address}.
+ Opens a socket or named pipe at {address} and listens for
+ |RPC| messages. Clients can send |API| commands to the address
+ to control Nvim. Returns the address string.
- If {address} contains `:`, a TCP socket is used. Everything in
- front of the last occurrence of `:` is the IP or hostname,
- everything after it the port. If the port is empty or `0`,
- a random port will be assigned.
+ If {address} does not contain a colon ":" it is interpreted as
+ a named pipe or Unix domain socket path.
+ Example: >
+ if has('win32')
+ call serverstart('\\.\pipe\nvim-pipe-1234')
+ else
+ call serverstart('nvim.sock')
+ endif
+<
+ If {address} contains a colon ":" it is interpreted as a TCP
+ address where the last ":" separates the host and port.
+ Assigns a random port if it is empty or 0. Supports IPv4/IPv6.
+
+ Example: >
+ :call serverstart('::1:12345')
+<
If no address is given, it is equivalent to: >
:call serverstart(tempname())