mirror of
https://github.com/neovim/neovim.git
synced 2025-10-22 17:11:49 +00:00
Doc: explain the format for serverstart()
This commit is contained in:
@@ -6462,11 +6462,20 @@ serverlist() *serverlist()*
|
|||||||
nvim --cmd "echo serverlist()" --cmd "q"
|
nvim --cmd "echo serverlist()" --cmd "q"
|
||||||
<
|
<
|
||||||
serverstart([{address}]) *serverstart()*
|
serverstart([{address}]) *serverstart()*
|
||||||
Opens a named pipe or TCP socket at {address} for clients to
|
Opens a TCP socket (IPv4/IPv6), Unix domain socket (Unix),
|
||||||
connect to and returns {address}. If no address is given, it
|
or named pipe (Windows) at {address} for clients to connect
|
||||||
is equivalent to: >
|
to and returns {address}.
|
||||||
|
|
||||||
|
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 no address is given, it is equivalent to: >
|
||||||
:call serverstart(tempname())
|
:call serverstart(tempname())
|
||||||
|
|
||||||
< |$NVIM_LISTEN_ADDRESS| is set to {address} if not already set.
|
< |$NVIM_LISTEN_ADDRESS| is set to {address} if not already set.
|
||||||
|
|
||||||
*--servername*
|
*--servername*
|
||||||
The Vim command-line option `--servername` can be imitated: >
|
The Vim command-line option `--servername` can be imitated: >
|
||||||
nvim --cmd "let g:server_addr = serverstart('foo')"
|
nvim --cmd "let g:server_addr = serverstart('foo')"
|
||||||
|
Reference in New Issue
Block a user