blob: 88dd32f69c2224e7923ebcbecad931c3bdaf0d9a [file] [log] [blame]
Christian Brabandt15141202024-08-03 15:40:19 +02001.TH VIM 1 "2024 Aug 03"
Bram Moolenaar071d4272004-06-13 20:20:40 +00002.SH NAME
Bram Moolenaar1ccd8ff2017-08-11 19:50:37 +02003vim \- Vi IMproved, a programmer's text editor
Bram Moolenaar071d4272004-06-13 20:20:40 +00004.SH SYNOPSIS
5.br
6.B vim
7[options] [file ..]
8.br
9.B vim
Bram Moolenaar4317d9b2005-03-18 20:25:31 +000010[options] \-
Bram Moolenaar071d4272004-06-13 20:20:40 +000011.br
12.B vim
13[options] \-t tag
14.br
15.B vim
16[options] \-q [errorfile]
17.PP
18.br
19.B ex
20.br
21.B view
22.br
23.B gvim
24.B gview
25.B evim
26.B eview
27.br
28.B rvim
29.B rview
30.B rgvim
31.B rgview
32.SH DESCRIPTION
33.B Vim
34is a text editor that is upwards compatible to Vi.
35It can be used to edit all kinds of plain text.
36It is especially useful for editing programs.
37.PP
38There are a lot of enhancements above Vi: multi level undo,
39multi windows and buffers, syntax highlighting, command line
40editing, filename completion, on-line help, visual selection, etc..
41See ":help vi_diff.txt" for a summary of the differences between
42.B Vim
43and Vi.
44.PP
45While running
46.B Vim
47a lot of help can be obtained from the on-line help system, with the ":help"
48command.
49See the ON-LINE HELP section below.
50.PP
51Most often
52.B Vim
53is started to edit a single file with the command
54.PP
55 vim file
56.PP
57More generally
58.B Vim
59is started with:
60.PP
61 vim [options] [filelist]
62.PP
63If the filelist is missing, the editor will start with an empty buffer.
64Otherwise exactly one out of the following four may be used to choose one or
65more files to be edited.
66.TP 12
67file ..
68A list of filenames.
69The first one will be the current file and read into the buffer.
70The cursor will be positioned on the first line of the buffer.
71You can get to the other files with the ":next" command.
Bram Moolenaar4317d9b2005-03-18 20:25:31 +000072To edit a file that starts with a dash, precede the filelist with "\-\-".
Bram Moolenaar071d4272004-06-13 20:20:40 +000073.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +000074\-
Bram Moolenaar071d4272004-06-13 20:20:40 +000075The file to edit is read from stdin. Commands are read from stderr, which
76should be a tty.
77.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +000078\-t {tag}
Bram Moolenaar071d4272004-06-13 20:20:40 +000079The file to edit and the initial cursor position depends on a "tag", a sort
80of goto label.
81{tag} is looked up in the tags file, the associated file becomes the current
82file and the associated command is executed.
83Mostly this is used for C programs, in which case {tag} could be a function
84name.
85The effect is that the file containing that function becomes the current file
86and the cursor is positioned on the start of the function.
Bram Moolenaar3991dab2006-03-27 17:01:56 +000087See ":help tag\-commands".
Bram Moolenaar071d4272004-06-13 20:20:40 +000088.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +000089\-q [errorfile]
Bram Moolenaar071d4272004-06-13 20:20:40 +000090Start in quickFix mode.
91The file [errorfile] is read and the first error is displayed.
92If [errorfile] is omitted, the filename is obtained from the 'errorfile'
93option (defaults to "AztecC.Err" for the Amiga, "errors.err" on other
94systems).
95Further errors can be jumped to with the ":cn" command.
96See ":help quickfix".
97.PP
98.B Vim
99behaves differently, depending on the name of the command (the executable may
100still be the same file).
101.TP 10
102vim
103The "normal" way, everything is default.
104.TP
105ex
106Start in Ex mode.
107Go to Normal mode with the ":vi" command.
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000108Can also be done with the "\-e" argument.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000109.TP
110view
Bram Moolenaarfd358112018-07-07 23:21:31 +0200111Start in read-only mode. You will be protected from writing the files.
112Can also be done with the "\-R" argument.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000113.TP
114gvim gview
115The GUI version.
116Starts a new window.
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000117Can also be done with the "\-g" argument.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000118.TP
119evim eview
120The GUI version in easy mode.
121Starts a new window.
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000122Can also be done with the "\-y" argument.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000123.TP
124rvim rview rgvim rgview
125Like the above, but with restrictions. It will not be possible to start shell
126commands, or suspend
127.B Vim.
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000128Can also be done with the "\-Z" argument.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000129.SH OPTIONS
130The options may be given in any order, before or after filenames.
131Options without an argument can be combined after a single dash.
132.TP 12
133+[num]
134For the first file the cursor will be positioned on line "num".
135If "num" is missing, the cursor will be positioned on the last line.
136.TP
137+/{pat}
Bram Moolenaar8a94d872015-01-25 13:02:57 +0100138For the first file the cursor will be positioned in the line with the
Bram Moolenaar071d4272004-06-13 20:20:40 +0000139first occurrence of {pat}.
Bram Moolenaar3991dab2006-03-27 17:01:56 +0000140See ":help search\-pattern" for the available search patterns.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000141.TP
142+{command}
143.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000144\-c {command}
Bram Moolenaarfd358112018-07-07 23:21:31 +0200145{command} will be executed after the first file has been read.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000146{command} is interpreted as an Ex command.
147If the {command} contains spaces it must be enclosed in double quotes (this
148depends on the shell that is used).
Bram Moolenaar2547aa92020-07-26 17:00:44 +0200149Example: vim "+set si" main.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000150.br
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000151Note: You can use up to 10 "+" or "\-c" commands.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000152.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000153\-S {file}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000154{file} will be sourced after the first file has been read.
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000155This is equivalent to \-c "source {file}".
156{file} cannot start with '\-'.
157If {file} is omitted "Session.vim" is used (only works when \-S is the last
Bram Moolenaar071d4272004-06-13 20:20:40 +0000158argument).
159.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000160\-\-cmd {command}
161Like using "\-c", but the command is executed just before
Bram Moolenaar071d4272004-06-13 20:20:40 +0000162processing any vimrc file.
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000163You can use up to 10 of these commands, independently from "\-c" commands.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000164.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000165\-A
Bram Moolenaar071d4272004-06-13 20:20:40 +0000166If
167.B Vim
168has been compiled with ARABIC support for editing right-to-left
169oriented files and Arabic keyboard mapping, this option starts
170.B Vim
171in Arabic mode, i.e. 'arabic' is set. Otherwise an error
172message is given and
173.B Vim
174aborts.
175.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000176\-b
Bram Moolenaar071d4272004-06-13 20:20:40 +0000177Binary mode.
178A few options will be set that makes it possible to edit a binary or
179executable file.
180.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000181\-C
Bram Moolenaar071d4272004-06-13 20:20:40 +0000182Compatible. Set the 'compatible' option.
183This will make
184.B Vim
185behave mostly like Vi, even though a .vimrc file exists.
186.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000187\-d
Bram Moolenaar071d4272004-06-13 20:20:40 +0000188Start in diff mode.
Bram Moolenaar2346a632021-06-13 19:02:49 +0200189There should between two to eight file name arguments.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000190.B Vim
191will open all the files and show differences between them.
192Works like vimdiff(1).
193.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200194\-d {device}, \-dev {device}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000195Open {device} for use as a terminal.
196Only on the Amiga.
197Example:
198"\-d con:20/30/600/150".
199.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000200\-D
Bram Moolenaar071d4272004-06-13 20:20:40 +0000201Debugging. Go to debugging mode when executing the first command from a
202script.
203.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000204\-e
Bram Moolenaar071d4272004-06-13 20:20:40 +0000205Start
206.B Vim
207in Ex mode, just like the executable was called "ex".
208.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000209\-E
Bram Moolenaar071d4272004-06-13 20:20:40 +0000210Start
211.B Vim
212in improved Ex mode, just like the executable was called "exim".
213.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000214\-f
Bram Moolenaar071d4272004-06-13 20:20:40 +0000215Foreground. For the GUI version,
216.B Vim
217will not fork and detach from the shell it was started in.
218On the Amiga,
219.B Vim
220is not restarted to open a new window.
221This option should be used when
222.B Vim
223is executed by a program that will wait for the edit
224session to finish (e.g. mail).
225On the Amiga the ":sh" and ":!" commands will not work.
226.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000227\-\-nofork
Bram Moolenaar071d4272004-06-13 20:20:40 +0000228Foreground. For the GUI version,
229.B Vim
230will not fork and detach from the shell it was started in.
231.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000232\-F
Bram Moolenaar071d4272004-06-13 20:20:40 +0000233If
234.B Vim
235has been compiled with FKMAP support for editing right-to-left
236oriented files and Farsi keyboard mapping, this option starts
237.B Vim
238in Farsi mode, i.e. 'fkmap' and 'rightleft' are set.
239Otherwise an error message is given and
240.B Vim
241aborts.
242.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000243\-g
Bram Moolenaar071d4272004-06-13 20:20:40 +0000244If
245.B Vim
246has been compiled with GUI support, this option enables the GUI.
247If no GUI support was compiled in, an error message is given and
248.B Vim
249aborts.
250.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200251\-\-gui-dialog-file {name}
252When using the GUI, instead of showing a dialog, write the title and message of
253the dialog to file {name}. The file is created or appended to. Only useful
254for testing, to avoid that the test gets stuck on a dialog that can't be seen.
255Without the GUI the argument is ignored.
256.TP
257\-\-help, \-h, \-?
Bram Moolenaar071d4272004-06-13 20:20:40 +0000258Give a bit of help about the command line arguments and options.
259After this
260.B Vim
261exits.
262.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000263\-H
Bram Moolenaar071d4272004-06-13 20:20:40 +0000264If
265.B Vim
266has been compiled with RIGHTLEFT support for editing right-to-left
267oriented files and Hebrew keyboard mapping, this option starts
268.B Vim
269in Hebrew mode, i.e. 'hkmap' and 'rightleft' are set.
270Otherwise an error message is given and
271.B Vim
272aborts.
273.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000274\-i {viminfo}
Bram Moolenaar56c860c2019-08-17 20:09:31 +0200275Specifies the filename to use when reading or writing the viminfo file,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000276instead of the default "~/.viminfo".
277This can also be used to skip the use of the .viminfo file, by giving the name
278"NONE".
279.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000280\-L
281Same as \-r.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000282.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000283\-l
Bram Moolenaar071d4272004-06-13 20:20:40 +0000284Lisp mode.
285Sets the 'lisp' and 'showmatch' options on.
286.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000287\-m
Bram Moolenaar071d4272004-06-13 20:20:40 +0000288Modifying files is disabled.
289Resets the 'write' option.
290You can still modify the buffer, but writing a file is not possible.
291.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000292\-M
Bram Moolenaar071d4272004-06-13 20:20:40 +0000293Modifications not allowed. The 'modifiable' and 'write' options will be unset,
294so that changes are not allowed and files can not be written. Note that these
295options can be set to enable making modifications.
296.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000297\-N
Bram Moolenaar56c860c2019-08-17 20:09:31 +0200298No-compatible mode. Resets the 'compatible' option.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000299This will make
300.B Vim
301behave a bit better, but less Vi compatible, even though a .vimrc file does
302not exist.
303.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000304\-n
Bram Moolenaar071d4272004-06-13 20:20:40 +0000305No swap file will be used.
306Recovery after a crash will be impossible.
307Handy if you want to edit a file on a very slow medium (e.g. floppy).
308Can also be done with ":set uc=0".
309Can be undone with ":set uc=200".
310.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000311\-nb
Bram Moolenaar071d4272004-06-13 20:20:40 +0000312Become an editor server for NetBeans. See the docs for details.
313.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000314\-o[N]
Bram Moolenaar071d4272004-06-13 20:20:40 +0000315Open N windows stacked.
316When N is omitted, open one window for each file.
317.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000318\-O[N]
Bram Moolenaar071d4272004-06-13 20:20:40 +0000319Open N windows side by side.
320When N is omitted, open one window for each file.
321.TP
Bram Moolenaarc17ef8e2006-03-25 21:48:58 +0000322\-p[N]
323Open N tab pages.
324When N is omitted, open one tab page for each file.
325.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200326\-P {parent-title}
327Win32 GUI only: Specify the title of the parent application. When possible, Vim
328will run in an MDI window inside the application. {parent-title} must appear in
329the window title of the parent application. Make sure that it is specific
330enough. Note that the implementation is still primitive. It won't work with
331all applications and the menu doesn't work.
332.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000333\-R
Bram Moolenaar071d4272004-06-13 20:20:40 +0000334Read-only mode.
335The 'readonly' option will be set.
Bram Moolenaar03413f42016-04-12 21:07:15 +0200336You can still edit the buffer, but will be prevented from accidentally
Bram Moolenaar071d4272004-06-13 20:20:40 +0000337overwriting a file.
338If you do want to overwrite a file, add an exclamation mark to the Ex command,
339as in ":w!".
Bram Moolenaar24a98a02017-09-27 22:23:55 +0200340The \-R option also implies the \-n option (see above).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000341The 'readonly' option can be reset with ":set noro".
342See ":help 'readonly'".
343.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000344\-r
Bram Moolenaar071d4272004-06-13 20:20:40 +0000345List swap files, with information about using them for recovery.
346.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000347\-r {file}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000348Recovery mode.
349The swap file is used to recover a crashed editing session.
350The swap file is a file with the same filename as the text file with ".swp"
351appended.
352See ":help recovery".
353.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000354\-s
355Silent mode. Only when started as "Ex" or when the "\-e" option was given
356before the "\-s" option.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000357.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000358\-s {scriptin}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000359The script file {scriptin} is read.
360The characters in the file are interpreted as if you had typed them.
361The same can be done with the command ":source! {scriptin}".
362If the end of the file is reached before the editor exits, further characters
363are read from the keyboard.
364.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000365\-T {terminal}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000366Tells
367.B Vim
368the name of the terminal you are using.
369Only required when the automatic way doesn't work.
Bram Moolenaarfd358112018-07-07 23:21:31 +0200370Should be a terminal known to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000371.B Vim
372(builtin) or defined in the termcap or terminfo file.
373.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200374\-\-not-a-term
375Tells
376.B Vim
377that the user knows that the input and/or output is not connected to a
378terminal. This will avoid the warning and the two second delay that would
379happen.
380.TP
381\-\-ttyfail
382When stdin or stdout is not a a terminal (tty) then exit right away.
383.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000384\-u {vimrc}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000385Use the commands in the file {vimrc} for initializations.
386All the other initializations are skipped.
387Use this to edit a special kind of files.
388It can also be used to skip all initializations by giving the name "NONE".
389See ":help initialization" within vim for more details.
390.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000391\-U {gvimrc}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000392Use the commands in the file {gvimrc} for GUI initializations.
393All the other GUI initializations are skipped.
394It can also be used to skip all GUI initializations by giving the name "NONE".
Bram Moolenaar3991dab2006-03-27 17:01:56 +0000395See ":help gui\-init" within vim for more details.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000396.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000397\-V[N]
Bram Moolenaar071d4272004-06-13 20:20:40 +0000398Verbose. Give messages about which files are sourced and for reading and
399writing a viminfo file. The optional number N is the value for 'verbose'.
400Default is 10.
401.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200402\-V[N]{filename}
403Like \-V and set 'verbosefile' to {filename}. The result is that messages are
404not displayed but written to the file {filename}. {filename} must not start
405with a digit.
406.TP
407\-\-log {filename}
408If
409.B Vim
410has been compiled with eval and channel feature, start logging and write
411entries to {filename}. This works like calling
412.I ch_logfile({filename}, 'ao')
413very early during startup.
414.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000415\-v
Bram Moolenaar071d4272004-06-13 20:20:40 +0000416Start
417.B Vim
418in Vi mode, just like the executable was called "vi". This only has effect
419when the executable is called "ex".
420.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200421\-w{number}
422Set the 'window' option to {number}.
423.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000424\-w {scriptout}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000425All the characters that you type are recorded in the file
426{scriptout}, until you exit
427.B Vim.
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000428This is useful if you want to create a script file to be used with "vim \-s" or
Bram Moolenaar071d4272004-06-13 20:20:40 +0000429":source!".
430If the {scriptout} file exists, characters are appended.
431.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000432\-W {scriptout}
433Like \-w, but an existing file is overwritten.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000434.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000435\-x
Christian Brabandt15141202024-08-03 15:40:19 +0200436If
437.B Vim
438has been compiled with encryption support, use encryption when writing files.
439Will prompt for a crypt key.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000440.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000441\-X
Bram Moolenaar071d4272004-06-13 20:20:40 +0000442Don't connect to the X server. Shortens startup time in a terminal, but the
443window title and clipboard will not be used.
444.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000445\-y
Bram Moolenaar071d4272004-06-13 20:20:40 +0000446Start
447.B Vim
448in easy mode, just like the executable was called "evim" or "eview".
449Makes
450.B Vim
451behave like a click-and-type editor.
452.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000453\-Z
Bram Moolenaar071d4272004-06-13 20:20:40 +0000454Restricted mode. Works like the executable starts with "r".
455.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000456\-\-
Bram Moolenaar071d4272004-06-13 20:20:40 +0000457Denotes the end of the options.
458Arguments after this will be handled as a file name.
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000459This can be used to edit a filename that starts with a '\-'.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000460.TP
Bram Moolenaar56994d22021-04-17 16:31:09 +0200461\-\-clean
462Do not use any personal configuration (vimrc, plugins, etc.). Useful to see if
463a problem reproduces with a clean Vim setup.
464.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000465\-\-echo\-wid
Bram Moolenaar009b2592004-10-24 19:18:58 +0000466GTK GUI only: Echo the Window ID on stdout.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000467.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000468\-\-literal
Bram Moolenaar009b2592004-10-24 19:18:58 +0000469Take file name arguments literally, do not expand wildcards. This has no
470effect on Unix where the shell expands wildcards.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000471.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000472\-\-noplugin
473Skip loading plugins. Implied by \-u NONE.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000474.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000475\-\-remote
Bram Moolenaar071d4272004-06-13 20:20:40 +0000476Connect to a Vim server and make it edit the files given in the rest of the
477arguments. If no server is found a warning is given and the files are edited
478in the current Vim.
479.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000480\-\-remote\-expr {expr}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000481Connect to a Vim server, evaluate {expr} in it and print the result on stdout.
482.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000483\-\-remote\-send {keys}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000484Connect to a Vim server and send {keys} to it.
485.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000486\-\-remote\-silent
487As \-\-remote, but without the warning when no server is found.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000488.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000489\-\-remote\-wait
490As \-\-remote, but Vim does not exit until the files have been edited.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000491.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000492\-\-remote\-wait\-silent
493As \-\-remote\-wait, but without the warning when no server is found.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000494.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000495\-\-serverlist
Bram Moolenaar071d4272004-06-13 20:20:40 +0000496List the names of all Vim servers that can be found.
497.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000498\-\-servername {name}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000499Use {name} as the server name. Used for the current Vim, unless used with a
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000500\-\-remote argument, then it's the name of the server to connect to.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000501.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000502\-\-socketid {id}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000503GTK GUI only: Use the GtkPlug mechanism to run gvim in another window.
504.TP
Bram Moolenaar3132cdd2020-11-05 20:41:49 +0100505\-\-startuptime {file}
506During startup write timing messages to the file {fname}.
507.TP
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000508\-\-version
Bram Moolenaar071d4272004-06-13 20:20:40 +0000509Print version information and exit.
Christian Brabandtce6fe842024-06-04 21:58:32 +0200510.TP
511\-\-windowid {id}
512Win32 GUI only: Make gvim try to use the window {id} as a parent, so that it
513runs inside that window.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000514.SH ON-LINE HELP
515Type ":help" in
516.B Vim
517to get started.
518Type ":help subject" to get help on a specific subject.
519For example: ":help ZZ" to get help for the "ZZ" command.
Bram Moolenaar3991dab2006-03-27 17:01:56 +0000520Use <Tab> and CTRL-D to complete subjects (":help cmdline\-completion").
Bram Moolenaar071d4272004-06-13 20:20:40 +0000521Tags are present to jump from one place to another (sort of hypertext links,
522see ":help").
523All documentation files can be viewed in this way, for example
524":help syntax.txt".
525.SH FILES
526.TP 15
Christian Brabandtce6fe842024-06-04 21:58:32 +0200527/usr/local/share/vim/vim??/doc/*.txt
Bram Moolenaar071d4272004-06-13 20:20:40 +0000528The
529.B Vim
530documentation files.
Bram Moolenaar4317d9b2005-03-18 20:25:31 +0000531Use ":help doc\-file\-list" to get the complete list.
Christian Brabandtce6fe842024-06-04 21:58:32 +0200532.br
533.I vim??
534is short version number, like vim91 for
535.B Vim 9.1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000536.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200537/usr/local/share/vim/vim??/doc/tags
Bram Moolenaar071d4272004-06-13 20:20:40 +0000538The tags file used for finding information in the documentation files.
539.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200540/usr/local/share/vim/vim??/syntax/syntax.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000541System wide syntax initializations.
542.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200543/usr/local/share/vim/vim??/syntax/*.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000544Syntax files for various languages.
545.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200546/usr/local/share/vim/vimrc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000547System wide
548.B Vim
549initializations.
550.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200551~/.vimrc, ~/.vim/vimrc, $XDG_CONFIG_HOME/vim/vimrc
Bram Moolenaar05159a02005-02-26 23:04:13 +0000552Your personal
553.B Vim
Christian Brabandtce6fe842024-06-04 21:58:32 +0200554initializations (first one found is used).
Bram Moolenaar05159a02005-02-26 23:04:13 +0000555.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200556/usr/local/share/vim/gvimrc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000557System wide gvim initializations.
558.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200559~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc
560Your personal gvim initializations (first one found is used).
Bram Moolenaar05159a02005-02-26 23:04:13 +0000561.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200562/usr/local/share/vim/vim??/optwin.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000563Script used for the ":options" command, a nice way to view and set options.
564.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200565/usr/local/share/vim/vim??/menu.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000566System wide menu initializations for gvim.
567.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200568/usr/local/share/vim/vim??/bugreport.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000569Script to generate a bug report. See ":help bugs".
570.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200571/usr/local/share/vim/vim??/filetype.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000572Script to detect the type of a file by its name. See ":help 'filetype'".
573.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200574/usr/local/share/vim/vim??/scripts.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000575Script to detect the type of a file by its contents. See ":help 'filetype'".
576.TP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200577/usr/local/share/vim/vim??/print/*.ps
Bram Moolenaar071d4272004-06-13 20:20:40 +0000578Files used for PostScript printing.
579.PP
580For recent info read the VIM home page:
581.br
582<URL:http://www.vim.org/>
583.SH SEE ALSO
584vimtutor(1)
585.SH AUTHOR
586Most of
587.B Vim
588was made by Bram Moolenaar, with a lot of help from others.
589See ":help credits" in
590.B Vim.
591.br
592.B Vim
593is based on Stevie, worked on by: Tim Thompson,
594Tony Andrews and G.R. (Fred) Walter.
595Although hardly any of the original code remains.
596.SH BUGS
597Probably.
598See ":help todo" for a list of known problems.
599.PP
600Note that a number of things that may be regarded as bugs by some, are in fact
601caused by a too-faithful reproduction of Vi's behaviour.
602And if you think other things are bugs "because Vi does it differently",
603you should take a closer look at the vi_diff.txt file (or type :help
604vi_diff.txt when in Vim).
605Also have a look at the 'compatible' and 'cpoptions' options.