robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Justin M. Keyesdocs: misc, custom text-object #39877f1fad32e2e

master
4.1 KiB115 linesraw
1*remote.txt*    Nvim
2
3
4		  VIM REFERENCE MANUAL	  by Bram Moolenaar
5
6
7Vim client-server communication				*client-server*
8
9                                      Type |gO| to see the table of contents.
10
11==============================================================================
121. Common functionality					*clientserver*
13
14Nvim's |RPC| functionality allows clients to programmatically control Nvim. Nvim
15itself takes command-line arguments that cause it to become a client to another
16Nvim running as a server. These arguments match those provided by Vim's
17clientserver option.
18
19The following command line arguments are available:
20
21    argument			meaning	~
22
23   --remote [+{cmd}] {file} ...					*--remote*
24				Open the file list in a remote Vim.  When
25				there is no Vim server, execute locally.
26				Vim allows one init command: +{cmd}.
27				This must be an Ex command that can be
28				followed by "|". It's not yet supported by
29				Nvim.
30				The rest of the command line is taken as the
31				file list.  Thus any non-file arguments must
32				come before this.
33				You cannot edit stdin this way |--|.
34				The remote Vim is raised.  If you don't want
35				this use >
36				 nvim --remote-send "<C-\><C-N>:n filename<CR>"
37<
38   --remote-silent [+{cmd}] {file} ...			*--remote-silent*
39				As above, but don't complain if there is no
40				server and the file is edited locally.
41							*--remote-tab*
42   --remote-tab			Like --remote but open each file in a new
43				tabpage.
44							*--remote-tab-silent*
45   --remote-tab-silent		Like --remote-silent but open each file in a
46				new tabpage.
47								*--remote-send*
48   --remote-send {keys}		Send {keys} to server and exit.  The {keys}
49				are not mapped.  Special key names are
50				recognized, e.g., "<CR>" results in a CR
51				character.
52								*--remote-expr*
53   --remote-expr {expr}		Evaluate {expr} in server and print the result
54				on stdout.
55								*--remote-ui*
56   --remote-ui			Display the UI of the server in the terminal.
57				Fully interactive: keyboard and mouse input
58				are forwarded to the server.
59								*--server*
60   --server {addr}		Connect to the named pipe or socket at the
61				given address for executing remote commands.
62				See |--listen| for specifying an address when
63				starting a server.
64
65Examples ~
66
67Start an Nvim server listening on a named pipe at '~/.cache/nvim/server.pipe': >
68    nvim --listen ~/.cache/nvim/server.pipe
69
70Edit "file.txt" in an Nvim server listening at '~/.cache/nvim/server.pipe': >
71    nvim --server ~/.cache/nvim/server.pipe --remote file.txt
72
73This doesn't work, all arguments after --remote will be used as file names: >
74    nvim --remote --server ~/.cache/nvim/server.pipe file.txt
75
76Tell the remote server to write all files and exit: >
77    nvim --server ~/.cache/nvim/server.pipe --remote-send '<C-\><C-N>:wqa<CR>'
78
79
80REMOTE EDITING
81
82The --remote argument will cause a |:drop| command to be constructed from the
83rest of the command line and sent as described above.
84Note that the --remote and --remote-wait arguments will consume the rest of
85the command line.  I.e. all remaining arguments will be regarded as filenames.
86You can not put options there!
87
88
89==============================================================================
902. Missing functionality			*E5600* *clientserver-missing*
91
92Vim supports additional functionality in clientserver that's not yet
93implemented in Nvim. In particular, none of the "wait" variants are supported
94yet. The following command line arguments are not yet available:
95
96    argument			meaning	~
97
98   --remote-wait [+{cmd}] {file} ...				*--remote-wait*
99				Not yet supported by Nvim.
100				As --remote, but wait for files to complete
101				(unload) in remote Vim.
102   --remote-wait-silent [+{cmd}] {file} ...		*--remote-wait-silent*
103				Not yet supported by Nvim.
104				As --remote-wait, but don't complain if there
105				is no server.
106							*--remote-tab-wait*
107   --remote-tab-wait		Not yet supported by Nvim.
108				Like --remote-wait but open each file in a new
109				tabpage.
110						*--remote-tab-wait-silent*
111   --remote-tab-wait-silent	Not yet supported by Nvim.
112				Like --remote-wait-silent but open each file
113				in a new tabpage.
114
115 vim:tw=78:sw=4:ts=8:noet:ft=help:norl: