annotate runtime/doc/remote.txt @ 33235:44fa2b82a642 v9.0.1891

patch 9.0.1891: No runtime support for Mojo Commit: https://github.com/vim/vim/commit/0ce2c594d0704f27a16d2c13fce85d596cc91489 Author: Mahmoud Abduljawad <mahmoud@masaar.com> Date: Sun Sep 10 18:23:04 2023 +0200 patch 9.0.1891: No runtime support for Mojo Problem: No runtime support for Mojo Solution: Add basic filetype and syntax plugins closes: #13062 closes: #13063 Signed-off-by: Christian Brabandt <cb@256bit.org> Signed-off-by: Doug Kearns <dougkearns@gmail.com> Co-authored-by: Mahmoud Abduljawad <mahmoud@masaar.com>
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Sep 2023 18:30:06 +0200
parents a9b5ffbc0428
children 4635e43f2c6f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29314
f8116058ca76 release version 9.0
Bram Moolenaar <Bram@vim.org>
parents: 27804
diff changeset
1 *remote.txt* For Vim version 9.0. Last change: 2022 Feb 17
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 VIM REFERENCE MANUAL by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 Vim client-server communication *client-server*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 1. Common functionality |clientserver|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 2. X11 specific items |x11-clientserver|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 3. MS-Windows specific items |w32-clientserver|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 1. Common functionality *clientserver*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 When compiled with the |+clientserver| option, Vim can act as a command
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 server. It accepts messages from a client and executes them. At the same
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 time, Vim can function as a client and send commands to a Vim server.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 The following command line arguments are available:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 argument meaning ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 --remote [+{cmd}] {file} ... *--remote*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 Open the file list in a remote Vim. When
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 there is no Vim server, execute locally.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 There is one optional init command: +{cmd}.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 This must be an Ex command that can be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 followed by "|".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 The rest of the command line is taken as the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 file list. Thus any non-file arguments must
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 come before this.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 You cannot edit stdin this way |--|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 The remote Vim is raised. If you don't want
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 this use >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 vim --remote-send "<C-\><C-N>:n filename<CR>"
6648
099f8b730941 Update a few runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5294
diff changeset
37 <
099f8b730941 Update a few runtime files.
Bram Moolenaar <bram@vim.org>
parents: 5294
diff changeset
38 --remote-silent [+{cmd}] {file} ... *--remote-silent*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 As above, but don't complain if there is no
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 server and the file is edited locally.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 --remote-wait [+{cmd}] {file} ... *--remote-wait*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 As --remote, but wait for files to complete
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 (unload) in remote Vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 --remote-wait-silent [+{cmd}] {file} ... *--remote-wait-silent*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 As --remote-wait, but don't complain if there
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 is no server.
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
47 *--remote-tab*
733
a84cc6ebafca updated for version 7.0221
vimboss
parents: 714
diff changeset
48 --remote-tab Like --remote but open each file in a new
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
49 tabpage.
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
50 *--remote-tab-silent*
733
a84cc6ebafca updated for version 7.0221
vimboss
parents: 714
diff changeset
51 --remote-tab-silent Like --remote-silent but open each file in a
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
52 new tabpage.
733
a84cc6ebafca updated for version 7.0221
vimboss
parents: 714
diff changeset
53 *--remote-tab-wait*
a84cc6ebafca updated for version 7.0221
vimboss
parents: 714
diff changeset
54 --remote-tab-wait Like --remote-wait but open each file in a new
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
55 tabpage.
733
a84cc6ebafca updated for version 7.0221
vimboss
parents: 714
diff changeset
56
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
57 *--remote-tab-wait-silent*
733
a84cc6ebafca updated for version 7.0221
vimboss
parents: 714
diff changeset
58 --remote-tab-wait-silent Like --remote-wait-silent but open each file
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
59 in a new tabpage.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 *--servername*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 --servername {name} Become the server {name}. When used together
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 with one of the --remote commands: connect to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 server {name} instead of the default (see
14193
c460506890ba Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13963
diff changeset
64 below). The name used will be uppercase.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 *--remote-send*
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1276
diff changeset
66 --remote-send {keys} Send {keys} to server and exit. The {keys}
32004
a9b5ffbc0428 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 29314
diff changeset
67 are not mapped. Special key names are
1624
18ee39301b82 updated for version 7.2a
vimboss
parents: 1276
diff changeset
68 recognized, e.g., "<CR>" results in a CR
18ee39301b82 updated for version 7.2a
vimboss
parents: 1276
diff changeset
69 character.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 *--remote-expr*
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents: 237
diff changeset
71 --remote-expr {expr} Evaluate {expr} in server and print the result
856
8cd729851562 updated for version 7.0g
vimboss
parents: 842
diff changeset
72 on stdout.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 *--serverlist*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 --serverlist Output a list of server names.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 Examples ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 Edit "file.txt" in an already running GVIM server: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 gvim --remote file.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 Edit "file.txt" in an already running server called FOOBAR: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 gvim --servername FOOBAR --remote file.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 Edit "file.txt" in server "FILES" if it exists, become server "FILES"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 otherwise: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 gvim --servername FILES --remote-silent file.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 This doesn't work, all arguments after --remote will be used as file names: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 gvim --remote --servername FOOBAR file.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 Edit file "+foo" in a remote server (note the use of "./" to avoid the special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 meaning of the leading plus): >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 vim --remote ./+foo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 Tell the remote server "BLA" to write all files and exit: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 vim --servername BLA --remote-send '<C-\><C-N>:wqa<CR>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
11914
4f7081eb1e26 Updated runtime files
Christian Brabandt <cb@256bit.org>
parents: 11229
diff changeset
100 SERVER NAME *client-server-name*
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 By default Vim will try to register the name under which it was invoked (gvim,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 egvim ...). This can be overridden with the --servername argument. If the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 specified name is not available, a postfix is applied until a free name is
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
105 encountered, i.e. "gvim1" for the second invocation of gvim on a particular
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 X-server. The resulting name is available in the servername builtin variable
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 |v:servername|. The case of the server name is ignored, thus "gvim" and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 "GVIM" are considered equal.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 When Vim is invoked with --remote, --remote-wait or --remote-send it will try
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 to locate the server name determined by the invocation name and --servername
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 argument as described above. If an exact match is not available, the first
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 server with the number postfix will be used. If a name with the number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 postfix is specified with the --servername argument, it must match exactly.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 If no server can be located and --remote or --remote-wait was used, Vim will
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 start up according to the rest of the command line and do the editing by
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 itself. This way it is not necessary to know whether gvim is already started
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 when sending command to it.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 The --serverlist argument will cause Vim to print a list of registered command
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 servers on the standard output (stdout) and exit.
27804
8fc68ce4a097 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26779
diff changeset
123 *{server}*
8fc68ce4a097 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26779
diff changeset
124 The {server} argument is used by several functions. When this is an empty
8fc68ce4a097 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26779
diff changeset
125 string then on Unix the default server name is used, which is "GVIM". On
8fc68ce4a097 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26779
diff changeset
126 MS-Windows an empty string does not work.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 Win32 Note: Making the Vim server go to the foreground doesn't always work,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 because MS-Windows doesn't allow it. The client will move the server to the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 foreground when using the --remote or --remote-wait argument and the server
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 name starts with "g".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 REMOTE EDITING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 The --remote argument will cause a |:drop| command to be constructed from the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 rest of the command line and sent as described above.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 The --remote-wait argument does the same thing and additionally sets up to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 wait for each of the files to have been edited. This uses the BufUnload
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 event, thus as soon as a file has been unloaded, Vim assumes you are done
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 editing it.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 Note that the --remote and --remote-wait arguments will consume the rest of
237
73354c21f1e4 updated for version 7.0066
vimboss
parents: 7
diff changeset
143 the command line. I.e. all remaining arguments will be regarded as filenames.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 You can not put options there!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 FUNCTIONS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 *E240* *E573*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 There are a number of Vim functions for scripting the command server. See
26777
629e7046ef63 patch 8.2.3917: the eval.txt help file is way too big
Bram Moolenaar <Bram@vim.org>
parents: 21676
diff changeset
150 the description in |builtin.txt| or use CTRL-] on the function name to jump to
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 the full explanation.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 synopsis explanation ~
11229
146a1e213b60 Update runtime files. Add Rust support.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
154 remote_startserver( name) run a server
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 remote_expr( server, string, idvar) send expression
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 remote_send( server, string, idvar) send key sequence
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 serverlist() get a list of available servers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 remote_peek( serverid, retvar) check for reply string
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 remote_read( serverid) read reply string
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 server2client( serverid, string) send reply string
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 remote_foreground( server) bring server to the front
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 See also the explanation of |CTRL-\_CTRL-N|. Very useful as a leading key
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 sequence.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 The {serverid} for server2client() can be obtained with expand("<client>")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 2. X11 specific items *x11-clientserver*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 *E247* *E248* *E251* *E258* *E277*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 The communication between client and server goes through the X server. The
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 display of the Vim server must be specified. The usual protection of the X
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173 server is used, you must be able to open a window on the X server for the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 communication to work. It is possible to communicate between different
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 systems.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177 By default, a GUI Vim will register a name on the X-server by which it can be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 addressed for subsequent execution of injected strings. Vim can also act as
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 a client and send strings to other instances of Vim on the same X11 display.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 When an X11 GUI Vim (gvim) is started, it will try to register a send-server
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 name on the 'VimRegistry' property on the root window.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 A non GUI Vim with access to the X11 display (|xterm-clipboard| enabled), can
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 also act as a command server if a server name is explicitly given with the
21676
1b345fb68ae3 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18879
diff changeset
186 --servername argument, or when Vim was built with the |+autoservername|
12909
1578c0ba0dd1 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11914
diff changeset
187 feature.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 An empty --servername argument will cause the command server to be disabled.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 To send commands to a Vim server from another application, read the source
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 file src/if_xcmdsrv.c, it contains some hints about the protocol used.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
194 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
195 3. Win32 specific items *w32-clientserver*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 Every Win32 Vim can work as a server, also in the console. You do not need a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 version compiled with OLE. Windows messages are used, this works on any
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 version of MS-Windows. But only communication within one system is possible.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 Since MS-Windows messages are used, any other application should be able to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 communicate with a Vim server. An alternative is using the OLE functionality
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203 |ole-interface|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 When using gvim, the --remote-wait only works properly this way: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 start /w gvim --remote-wait file.txt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 <
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 14193
diff changeset
209 vim:tw=78:sw=4:ts=8:noet:ft=help:norl: