blob: 6d9cfe626c5050c802b627decea5f9dec91a994d [file] [log] [blame]
Bram Moolenaar86ae7202015-07-10 19:31:35 +02001VIM(1) General Commands Manual VIM(1)
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
Bram Moolenaar071d4272004-06-13 20:20:40 +00003NAME
Bram Moolenaarc572da52017-08-27 16:52:01 +02004 vim - Vi IMproved, a programmer's text editor
Bram Moolenaar071d4272004-06-13 20:20:40 +00005
6SYNOPSIS
7 vim [options] [file ..]
8 vim [options] -
9 vim [options] -t tag
10 vim [options] -q [errorfile]
11
12 ex
13 view
14 gvim gview evim eview
15 rvim rview rgvim rgview
16
17DESCRIPTION
18 Vim is a text editor that is upwards compatible to Vi. It can be used
19 to edit all kinds of plain text. It is especially useful for editing
20 programs.
21
Bram Moolenaar86ae7202015-07-10 19:31:35 +020022 There are a lot of enhancements above Vi: multi level undo, multi win‐
Bram Moolenaar071d4272004-06-13 20:20:40 +000023 dows and buffers, syntax highlighting, command line editing, filename
24 completion, on-line help, visual selection, etc.. See ":help
25 vi_diff.txt" for a summary of the differences between Vim and Vi.
26
27 While running Vim a lot of help can be obtained from the on-line help
Bram Moolenaar86ae7202015-07-10 19:31:35 +020028 system, with the ":help" command. See the ON-LINE HELP section below.
Bram Moolenaar071d4272004-06-13 20:20:40 +000029
30 Most often Vim is started to edit a single file with the command
31
32 vim file
33
34 More generally Vim is started with:
35
36 vim [options] [filelist]
37
38 If the filelist is missing, the editor will start with an empty buffer.
Foxe Chenb90c2392025-06-27 21:10:35 +020039 Otherwise exactly one out of the following four may be used to choose
Bram Moolenaar071d4272004-06-13 20:20:40 +000040 one or more files to be edited.
41
Foxe Chenb90c2392025-06-27 21:10:35 +020042 file .. A list of filenames. The first one will be the current
43 file and read into the buffer. The cursor will be posi‐
Bram Moolenaar071d4272004-06-13 20:20:40 +000044 tioned on the first line of the buffer. You can get to the
Bram Moolenaar86ae7202015-07-10 19:31:35 +020045 other files with the ":next" command. To edit a file that
Bram Moolenaar071d4272004-06-13 20:20:40 +000046 starts with a dash, precede the filelist with "--".
47
Bram Moolenaar86ae7202015-07-10 19:31:35 +020048 - The file to edit is read from stdin. Commands are read
Bram Moolenaar071d4272004-06-13 20:20:40 +000049 from stderr, which should be a tty.
50
51 -t {tag} The file to edit and the initial cursor position depends on
Foxe Chenb90c2392025-06-27 21:10:35 +020052 a "tag", a sort of goto label. {tag} is looked up in the
Bram Moolenaar071d4272004-06-13 20:20:40 +000053 tags file, the associated file becomes the current file and
Bram Moolenaar86ae7202015-07-10 19:31:35 +020054 the associated command is executed. Mostly this is used
55 for C programs, in which case {tag} could be a function
Bram Moolenaar071d4272004-06-13 20:20:40 +000056 name. The effect is that the file containing that function
Foxe Chenb90c2392025-06-27 21:10:35 +020057 becomes the current file and the cursor is positioned on
Bram Moolenaar071d4272004-06-13 20:20:40 +000058 the start of the function. See ":help tag-commands".
59
60 -q [errorfile]
Foxe Chenb90c2392025-06-27 21:10:35 +020061 Start in quickFix mode. The file [errorfile] is read and
62 the first error is displayed. If [errorfile] is omitted,
63 the filename is obtained from the 'errorfile' option (de‐
Bram Moolenaar06fe74a2019-08-31 16:20:32 +020064 faults to "AztecC.Err" for the Amiga, "errors.err" on other
65 systems). Further errors can be jumped to with the ":cn"
66 command. See ":help quickfix".
Bram Moolenaar071d4272004-06-13 20:20:40 +000067
Bram Moolenaar86ae7202015-07-10 19:31:35 +020068 Vim behaves differently, depending on the name of the command (the exe‐
Bram Moolenaar071d4272004-06-13 20:20:40 +000069 cutable may still be the same file).
70
71 vim The "normal" way, everything is default.
72
Foxe Chenb90c2392025-06-27 21:10:35 +020073 ex Start in Ex mode. Go to Normal mode with the ":vi" command.
Bram Moolenaar071d4272004-06-13 20:20:40 +000074 Can also be done with the "-e" argument.
75
Foxe Chenb90c2392025-06-27 21:10:35 +020076 view Start in read-only mode. You will be protected from writing
Bram Moolenaar071d4272004-06-13 20:20:40 +000077 the files. Can also be done with the "-R" argument.
78
79 gvim gview
80 The GUI version. Starts a new window. Can also be done with
81 the "-g" argument.
82
83 evim eview
84 The GUI version in easy mode. Starts a new window. Can also
85 be done with the "-y" argument.
86
87 rvim rview rgvim rgview
Bram Moolenaar86ae7202015-07-10 19:31:35 +020088 Like the above, but with restrictions. It will not be possi‐
89 ble to start shell commands, or suspend Vim. Can also be
Bram Moolenaar071d4272004-06-13 20:20:40 +000090 done with the "-Z" argument.
91
92OPTIONS
Bram Moolenaar06fe74a2019-08-31 16:20:32 +020093 The options may be given in any order, before or after filenames. Op‐
94 tions without an argument can be combined after a single dash.
Bram Moolenaar071d4272004-06-13 20:20:40 +000095
Bram Moolenaar86ae7202015-07-10 19:31:35 +020096 +[num] For the first file the cursor will be positioned on line
97 "num". If "num" is missing, the cursor will be positioned
Bram Moolenaar071d4272004-06-13 20:20:40 +000098 on the last line.
99
Bram Moolenaar86ae7202015-07-10 19:31:35 +0200100 +/{pat} For the first file the cursor will be positioned in the
101 line with the first occurrence of {pat}. See ":help
102 search-pattern" for the available search patterns.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000103
104 +{command}
105
106 -c {command}
Bram Moolenaar86ae7202015-07-10 19:31:35 +0200107 {command} will be executed after the first file has been
108 read. {command} is interpreted as an Ex command. If the
109 {command} contains spaces it must be enclosed in double
110 quotes (this depends on the shell that is used). Example:
Bram Moolenaar2547aa92020-07-26 17:00:44 +0200111 vim "+set si" main.c
Bram Moolenaar071d4272004-06-13 20:20:40 +0000112 Note: You can use up to 10 "+" or "-c" commands.
113
Christian Brabandt15141202024-08-03 15:40:19 +0200114 -A If Vim has been compiled with ARABIC support for editing
115 right-to-left oriented files and Arabic keyboard mapping,
116 this option starts Vim in Arabic mode, i.e. 'arabic' is
Bram Moolenaar071d4272004-06-13 20:20:40 +0000117 set. Otherwise an error message is given and Vim aborts.
118
Christian Brabandt15141202024-08-03 15:40:19 +0200119 -b Binary mode. A few options will be set that makes it pos‐
Bram Moolenaar071d4272004-06-13 20:20:40 +0000120 sible to edit a binary or executable file.
121
Christian Brabandt15141202024-08-03 15:40:19 +0200122 -C Compatible. Set the 'compatible' option. This will make
123 Vim behave mostly like Vi, even though a .vimrc file ex‐
Bram Moolenaar06fe74a2019-08-31 16:20:32 +0200124 ists.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000125
Bram Moolenaar2346a632021-06-13 19:02:49 +0200126 -d Start in diff mode. There should between two to eight file
Foxe Chenb90c2392025-06-27 21:10:35 +0200127 name arguments. Vim will open all the files and show dif‐
Bram Moolenaar2346a632021-06-13 19:02:49 +0200128 ferences between them. Works like vimdiff(1).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000129
Christian Brabandtce6fe842024-06-04 21:58:32 +0200130 -d {device}, -dev {device}
Foxe Chenb90c2392025-06-27 21:10:35 +0200131 Open {device} for use as a terminal. Only on the Amiga.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000132 Example: "-d con:20/30/600/150".
133
Foxe Chenb90c2392025-06-27 21:10:35 +0200134 -D Debugging. Go to debugging mode when executing the first
Bram Moolenaar071d4272004-06-13 20:20:40 +0000135 command from a script.
136
Foxe Chenb90c2392025-06-27 21:10:35 +0200137 -e Start Vim in Ex mode, just like the executable was called
Bram Moolenaar071d4272004-06-13 20:20:40 +0000138 "ex".
139
140 -E Start Vim in improved Ex mode, just like the executable was
141 called "exim".
142
Bram Moolenaar06fe74a2019-08-31 16:20:32 +0200143 -f Foreground. For the GUI version, Vim will not fork and de‐
Foxe Chenb90c2392025-06-27 21:10:35 +0200144 tach from the shell it was started in. On the Amiga, Vim
145 is not restarted to open a new window. This option should
146 be used when Vim is executed by a program that will wait
147 for the edit session to finish (e.g. mail). On the Amiga
Bram Moolenaar071d4272004-06-13 20:20:40 +0000148 the ":sh" and ":!" commands will not work.
149
Foxe Chenb90c2392025-06-27 21:10:35 +0200150 -F If Vim has been compiled with FKMAP support for editing
151 right-to-left oriented files and Farsi keyboard mapping,
152 this option starts Vim in Farsi mode, i.e. 'fkmap' and
153 'rightleft' are set. Otherwise an error message is given
Bram Moolenaar071d4272004-06-13 20:20:40 +0000154 and Vim aborts.
RestorerZ81b62dd2024-08-15 21:39:33 +0200155 Note: Farsi support has been removed in patch 8.1.0932.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000156
Foxe Chenb90c2392025-06-27 21:10:35 +0200157 -g If Vim has been compiled with GUI support, this option en‐
Bram Moolenaar06fe74a2019-08-31 16:20:32 +0200158 ables the GUI. If no GUI support was compiled in, an error
159 message is given and Vim aborts.
Bram Moolenaar86ae7202015-07-10 19:31:35 +0200160
Bram Moolenaar86ae7202015-07-10 19:31:35 +0200161 -H If Vim has been compiled with RIGHTLEFT support for editing
Foxe Chenb90c2392025-06-27 21:10:35 +0200162 right-to-left oriented files and Hebrew keyboard mapping,
163 this option starts Vim in Hebrew mode, i.e. 'hkmap' and
164 'rightleft' are set. Otherwise an error message is given
Bram Moolenaar86ae7202015-07-10 19:31:35 +0200165 and Vim aborts.
166
Bram Moolenaar071d4272004-06-13 20:20:40 +0000167 -i {viminfo}
Foxe Chenb90c2392025-06-27 21:10:35 +0200168 Specifies the filename to use when reading or writing the
169 viminfo file, instead of the default "~/.viminfo". This
170 can also be used to skip the use of the .viminfo file, by
Bram Moolenaar06fe74a2019-08-31 16:20:32 +0200171 giving the name "NONE".
Bram Moolenaar071d4272004-06-13 20:20:40 +0000172
Bram Moolenaar071d4272004-06-13 20:20:40 +0000173 -l Lisp mode. Sets the 'lisp' and 'showmatch' options on.
174
RestorerZ81b62dd2024-08-15 21:39:33 +0200175 -L Same as -r.
176
Foxe Chenb90c2392025-06-27 21:10:35 +0200177 -m Modifying files is disabled. Resets the 'write' option.
178 You can still modify the buffer, but writing a file is not
Bram Moolenaar071d4272004-06-13 20:20:40 +0000179 possible.
180
Foxe Chenb90c2392025-06-27 21:10:35 +0200181 -M Modifications not allowed. The 'modifiable' and 'write'
182 options will be unset, so that changes are not allowed and
183 files can not be written. Note that these options can be
Bram Moolenaar071d4272004-06-13 20:20:40 +0000184 set to enable making modifications.
185
Foxe Chenb90c2392025-06-27 21:10:35 +0200186 -n No swap file will be used. Recovery after a crash will be
187 impossible. Handy if you want to edit a file on a very
188 slow medium (e.g. floppy). Can also be done with ":set
RestorerZ81b62dd2024-08-15 21:39:33 +0200189 uc=0". Can be undone with ":set uc=200".
190
Foxe Chenb90c2392025-06-27 21:10:35 +0200191 -N No-compatible mode. Resets the 'compatible' option. This
192 will make Vim behave a bit better, but less Vi compatible,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000193 even though a .vimrc file does not exist.
194
Bram Moolenaar06fe74a2019-08-31 16:20:32 +0200195 -nb Become an editor server for NetBeans. See the docs for de‐
196 tails.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000197
198 -o[N] Open N windows stacked. When N is omitted, open one window
199 for each file.
200
Foxe Chenb90c2392025-06-27 21:10:35 +0200201 -O[N] Open N windows side by side. When N is omitted, open one
Bram Moolenaar071d4272004-06-13 20:20:40 +0000202 window for each file.
203
Bram Moolenaar1a14c2c2006-03-25 21:52:34 +0000204 -p[N] Open N tab pages. When N is omitted, open one tab page for
205 each file.
206
Christian Brabandtce6fe842024-06-04 21:58:32 +0200207 -P {parent-title}
Christian Brabandt15141202024-08-03 15:40:19 +0200208 Win32 GUI only: Specify the title of the parent applica‐
209 tion. When possible, Vim will run in an MDI window inside
210 the application. {parent-title} must appear in the window
Christian Brabandtce6fe842024-06-04 21:58:32 +0200211 title of the parent application. Make sure that it is spe‐
Foxe Chenb90c2392025-06-27 21:10:35 +0200212 cific enough. Note that the implementation is still primi‐
213 tive. It won't work with all applications and the menu
Christian Brabandtce6fe842024-06-04 21:58:32 +0200214 doesn't work.
215
Foxe Chenb90c2392025-06-27 21:10:35 +0200216 -r List swap files, with information about using them for re‐
Bram Moolenaar06fe74a2019-08-31 16:20:32 +0200217 covery.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000218
Foxe Chenb90c2392025-06-27 21:10:35 +0200219 -r {file} Recovery mode. The swap file is used to recover a crashed
220 editing session. The swap file is a file with the same
Bram Moolenaar071d4272004-06-13 20:20:40 +0000221 filename as the text file with ".swp" appended. See ":help
222 recovery".
223
RestorerZ81b62dd2024-08-15 21:39:33 +0200224 -R Read-only mode. The 'readonly' option will be set. You
225 can still edit the buffer, but will be prevented from acci‐
226 dentally overwriting a file. If you do want to overwrite a
227 file, add an exclamation mark to the Ex command, as in
228 ":w!". The -R option also implies the -n option (see
229 above). The 'readonly' option can be reset with ":set
230 noro". See ":help 'readonly'".
231
Christian Brabandt15141202024-08-03 15:40:19 +0200232 -s Silent mode. Only when started as "Ex" or when the "-e"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000233 option was given before the "-s" option.
234
235 -s {scriptin}
Christian Brabandt15141202024-08-03 15:40:19 +0200236 The script file {scriptin} is read. The characters in the
237 file are interpreted as if you had typed them. The same
Bram Moolenaar071d4272004-06-13 20:20:40 +0000238 can be done with the command ":source! {scriptin}". If the
239 end of the file is reached before the editor exits, further
240 characters are read from the keyboard.
241
RestorerZ81b62dd2024-08-15 21:39:33 +0200242 -S {file} {file} will be sourced after the first file has been read.
243 This is equivalent to -c "source {file}". {file} cannot
244 start with '-'. If {file} is omitted "Session.vim" is used
245 (only works when -S is the last argument).
246
Bram Moolenaar071d4272004-06-13 20:20:40 +0000247 -T {terminal}
Bram Moolenaar06fe74a2019-08-31 16:20:32 +0200248 Tells Vim the name of the terminal you are using. Only re‐
249 quired when the automatic way doesn't work. Should be a
Bram Moolenaar86ae7202015-07-10 19:31:35 +0200250 terminal known to Vim (builtin) or defined in the termcap
Bram Moolenaar071d4272004-06-13 20:20:40 +0000251 or terminfo file.
252
RestorerZ81b62dd2024-08-15 21:39:33 +0200253 -u {vimrc} Use the commands in the file {vimrc} for initializations.
254 All the other initializations are skipped. Use this to
255 edit a special kind of files. It can also be used to skip
256 all initializations by giving the name "NONE". See ":help
Bram Moolenaar071d4272004-06-13 20:20:40 +0000257 initialization" within vim for more details.
258
RestorerZ81b62dd2024-08-15 21:39:33 +0200259 -U {gvimrc} Use the commands in the file {gvimrc} for GUI initializa‐
260 tions. All the other GUI initializations are skipped. It
261 can also be used to skip all GUI initializations by giving
262 the name "NONE". See ":help gui-init" within vim for more
Bram Moolenaar071d4272004-06-13 20:20:40 +0000263 details.
264
RestorerZ81b62dd2024-08-15 21:39:33 +0200265 -v Start Vim in Vi mode, just like the executable was called
266 "vi". This only has effect when the executable is called
267 "ex".
268
269 -V[N] Verbose. Give messages about which files are sourced and
270 for reading and writing a viminfo file. The optional num‐
Bram Moolenaar071d4272004-06-13 20:20:40 +0000271 ber N is the value for 'verbose'. Default is 10.
272
Christian Brabandtce6fe842024-06-04 21:58:32 +0200273 -V[N]{filename}
274 Like -V and set 'verbosefile' to {filename}. The result is
Foxe Chenb90c2392025-06-27 21:10:35 +0200275 that messages are not displayed but written to the file
Christian Brabandtce6fe842024-06-04 21:58:32 +0200276 {filename}. {filename} must not start with a digit.
277
Christian Brabandtce6fe842024-06-04 21:58:32 +0200278 -w{number} Set the 'window' option to {number}.
279
Bram Moolenaar071d4272004-06-13 20:20:40 +0000280 -w {scriptout}
Foxe Chenb90c2392025-06-27 21:10:35 +0200281 All the characters that you type are recorded in the file
282 {scriptout}, until you exit Vim. This is useful if you
283 want to create a script file to be used with "vim -s" or
Bram Moolenaar071d4272004-06-13 20:20:40 +0000284 ":source!". If the {scriptout} file exists, characters are
285 appended.
286
287 -W {scriptout}
288 Like -w, but an existing file is overwritten.
289
RestorerZ81b62dd2024-08-15 21:39:33 +0200290 -x If Vim has been compiled with encryption support, use en‐
Christian Brabandt15141202024-08-03 15:40:19 +0200291 cryption when writing files. Will prompt for a crypt key.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000292
RestorerZ81b62dd2024-08-15 21:39:33 +0200293 -X Don't connect to the X server. Shortens startup time in a
294 terminal, but the window title and clipboard will not be
Bram Moolenaar071d4272004-06-13 20:20:40 +0000295 used.
296
Foxe Chenb90c2392025-06-27 21:10:35 +0200297 -Y Don't connect to the wayland compositor
298
Bram Moolenaar071d4272004-06-13 20:20:40 +0000299 -y Start Vim in easy mode, just like the executable was called
Foxe Chenb90c2392025-06-27 21:10:35 +0200300 "evim" or "eview". Makes Vim behave like a click-and-type
Bram Moolenaar071d4272004-06-13 20:20:40 +0000301 editor.
302
Foxe Chenb90c2392025-06-27 21:10:35 +0200303 -Z Restricted mode. Works like the executable starts with
Bram Moolenaar071d4272004-06-13 20:20:40 +0000304 "r".
305
Foxe Chenb90c2392025-06-27 21:10:35 +0200306 -- Denotes the end of the options. Arguments after this will
307 be handled as a file name. This can be used to edit a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000308 filename that starts with a '-'.
309
Foxe Chenb90c2392025-06-27 21:10:35 +0200310 --clean Do not use any personal configuration (vimrc, plugins,
311 etc.). Useful to see if a problem reproduces with a clean
Bram Moolenaar56994d22021-04-17 16:31:09 +0200312 Vim setup.
313
RestorerZ81b62dd2024-08-15 21:39:33 +0200314 --cmd {command}
Foxe Chenb90c2392025-06-27 21:10:35 +0200315 Like using "-c", but the command is executed just before
316 processing any vimrc file. You can use up to 10 of these
RestorerZ81b62dd2024-08-15 21:39:33 +0200317 commands, independently from "-c" commands.
318
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000319 --echo-wid GTK GUI only: Echo the Window ID on stdout.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000320
RestorerZ81b62dd2024-08-15 21:39:33 +0200321 --gui-dialog-file {name}
Foxe Chenb90c2392025-06-27 21:10:35 +0200322 When using the GUI, instead of showing a dialog, write the
323 title and message of the dialog to file {name}. The file
324 is created or appended to. Only useful for testing, to
325 avoid that the test gets stuck on a dialog that can't be
RestorerZ81b62dd2024-08-15 21:39:33 +0200326 seen. Without the GUI the argument is ignored.
327
328 --help, -h, -?
329 Give a bit of help about the command line arguments and op‐
330 tions. After this Vim exits.
331
332 --literal Take file name arguments literally, do not expand wild‐
333 cards. This has no effect on Unix where the shell expands
Bram Moolenaar293ee4d2004-12-09 21:34:53 +0000334 wildcards.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000335
RestorerZ81b62dd2024-08-15 21:39:33 +0200336 --log {filename}
337 If Vim has been compiled with eval and channel feature,
338 start logging and write entries to {filename}. This works
339 like calling ch_logfile({filename}, 'ao') very early during
340 startup.
341
342 --nofork Foreground. For the GUI version, Vim will not fork and de‐
343 tach from the shell it was started in.
344
Bram Moolenaar071d4272004-06-13 20:20:40 +0000345 --noplugin Skip loading plugins. Implied by -u NONE.
346
RestorerZ81b62dd2024-08-15 21:39:33 +0200347 --not-a-term
348 Tells Vim that the user knows that the input and/or output
349 is not connected to a terminal. This will avoid the warn‐
350 ing and the two second delay that would happen.
351
Bram Moolenaar071d4272004-06-13 20:20:40 +0000352 --remote Connect to a Vim server and make it edit the files given in
353 the rest of the arguments. If no server is found a warning
354 is given and the files are edited in the current Vim.
355
356 --remote-expr {expr}
RestorerZ81b62dd2024-08-15 21:39:33 +0200357 Connect to a Vim server, evaluate {expr} in it and print
Bram Moolenaar071d4272004-06-13 20:20:40 +0000358 the result on stdout.
359
360 --remote-send {keys}
361 Connect to a Vim server and send {keys} to it.
362
363 --remote-silent
RestorerZ81b62dd2024-08-15 21:39:33 +0200364 As --remote, but without the warning when no server is
Bram Moolenaar071d4272004-06-13 20:20:40 +0000365 found.
366
367 --remote-wait
RestorerZ81b62dd2024-08-15 21:39:33 +0200368 As --remote, but Vim does not exit until the files have
Bram Moolenaar071d4272004-06-13 20:20:40 +0000369 been edited.
370
371 --remote-wait-silent
372 As --remote-wait, but without the warning when no server is
373 found.
374
375 --serverlist
376 List the names of all Vim servers that can be found.
377
378 --servername {name}
Foxe Chenb90c2392025-06-27 21:10:35 +0200379 Use {name} as the server name. Used for the current Vim,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000380 unless used with a --remote argument, then it's the name of
381 the server to connect to.
382
383 --socketid {id}
RestorerZ81b62dd2024-08-15 21:39:33 +0200384 GTK GUI only: Use the GtkPlug mechanism to run gVim in an‐
Bram Moolenaar06fe74a2019-08-31 16:20:32 +0200385 other window.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000386
Bram Moolenaar3132cdd2020-11-05 20:41:49 +0100387 --startuptime {file}
388 During startup write timing messages to the file {fname}.
389
RestorerZ81b62dd2024-08-15 21:39:33 +0200390 --ttyfail When stdin or stdout is not a a terminal (tty) then exit
391 right away.
392
Bram Moolenaar071d4272004-06-13 20:20:40 +0000393 --version Print version information and exit.
394
Christian Brabandtce6fe842024-06-04 21:58:32 +0200395 --windowid {id}
RestorerZ81b62dd2024-08-15 21:39:33 +0200396 Win32 GUI only: Make gVim try to use the window {id} as a
Christian Brabandtce6fe842024-06-04 21:58:32 +0200397 parent, so that it runs inside that window.
398
Bram Moolenaar071d4272004-06-13 20:20:40 +0000399ON-LINE HELP
Christian Brabandtce6fe842024-06-04 21:58:32 +0200400 Type ":help" in Vim to get started. Type ":help subject" to get help
401 on a specific subject. For example: ":help ZZ" to get help for the
402 "ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmd‐
403 line-completion"). Tags are present to jump from one place to another
Bram Moolenaar071d4272004-06-13 20:20:40 +0000404 (sort of hypertext links, see ":help"). All documentation files can be
405 viewed in this way, for example ":help syntax.txt".
406
407FILES
Christian Brabandtce6fe842024-06-04 21:58:32 +0200408 /usr/local/share/vim/vim??/doc/*.txt
Foxe Chenb90c2392025-06-27 21:10:35 +0200409 The Vim documentation files. Use ":help doc-file-list"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000410 to get the complete list.
Christian Brabandtce6fe842024-06-04 21:58:32 +0200411 vim?? is short version number, like vim91 for Vim 9.1
Bram Moolenaar071d4272004-06-13 20:20:40 +0000412
Christian Brabandtce6fe842024-06-04 21:58:32 +0200413 /usr/local/share/vim/vim??/doc/tags
Foxe Chenb90c2392025-06-27 21:10:35 +0200414 The tags file used for finding information in the docu‐
Bram Moolenaar071d4272004-06-13 20:20:40 +0000415 mentation files.
416
Christian Brabandtce6fe842024-06-04 21:58:32 +0200417 /usr/local/share/vim/vim??/syntax/syntax.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000418 System wide syntax initializations.
419
Christian Brabandtce6fe842024-06-04 21:58:32 +0200420 /usr/local/share/vim/vim??/syntax/*.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000421 Syntax files for various languages.
422
Christian Brabandtce6fe842024-06-04 21:58:32 +0200423 /usr/local/share/vim/vimrc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000424 System wide Vim initializations.
425
Christian Brabandtce6fe842024-06-04 21:58:32 +0200426 ~/.vimrc, ~/.vim/vimrc, $XDG_CONFIG_HOME/vim/vimrc
Foxe Chenb90c2392025-06-27 21:10:35 +0200427 Your personal Vim initializations (first one found is
Christian Brabandtce6fe842024-06-04 21:58:32 +0200428 used).
Bram Moolenaar05159a02005-02-26 23:04:13 +0000429
Christian Brabandtce6fe842024-06-04 21:58:32 +0200430 /usr/local/share/vim/gvimrc
Bram Moolenaar071d4272004-06-13 20:20:40 +0000431 System wide gvim initializations.
432
Christian Brabandtce6fe842024-06-04 21:58:32 +0200433 ~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc
Foxe Chenb90c2392025-06-27 21:10:35 +0200434 Your personal gVim initializations (first one found is
Christian Brabandtce6fe842024-06-04 21:58:32 +0200435 used).
Bram Moolenaar05159a02005-02-26 23:04:13 +0000436
Christian Brabandtce6fe842024-06-04 21:58:32 +0200437 /usr/local/share/vim/vim??/optwin.vim
Foxe Chenb90c2392025-06-27 21:10:35 +0200438 Script used for the ":options" command, a nice way to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000439 view and set options.
440
Christian Brabandtce6fe842024-06-04 21:58:32 +0200441 /usr/local/share/vim/vim??/menu.vim
RestorerZ81b62dd2024-08-15 21:39:33 +0200442 System wide menu initializations for gVim.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000443
Christian Brabandtce6fe842024-06-04 21:58:32 +0200444 /usr/local/share/vim/vim??/bugreport.vim
Bram Moolenaar071d4272004-06-13 20:20:40 +0000445 Script to generate a bug report. See ":help bugs".
446
Christian Brabandtce6fe842024-06-04 21:58:32 +0200447 /usr/local/share/vim/vim??/filetype.vim
Foxe Chenb90c2392025-06-27 21:10:35 +0200448 Script to detect the type of a file by its name. See
Bram Moolenaar071d4272004-06-13 20:20:40 +0000449 ":help 'filetype'".
450
Christian Brabandtce6fe842024-06-04 21:58:32 +0200451 /usr/local/share/vim/vim??/scripts.vim
Foxe Chenb90c2392025-06-27 21:10:35 +0200452 Script to detect the type of a file by its contents.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000453 See ":help 'filetype'".
454
Christian Brabandtce6fe842024-06-04 21:58:32 +0200455 /usr/local/share/vim/vim??/print/*.ps
Bram Moolenaar071d4272004-06-13 20:20:40 +0000456 Files used for PostScript printing.
457
458 For recent info read the VIM home page:
459 <URL:http://www.vim.org/>
460
461SEE ALSO
462 vimtutor(1)
463
464AUTHOR
465 Most of Vim was made by Bram Moolenaar, with a lot of help from others.
466 See ":help credits" in Vim.
Christian Brabandtce6fe842024-06-04 21:58:32 +0200467 Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and
Bram Moolenaar86ae7202015-07-10 19:31:35 +0200468 G.R. (Fred) Walter. Although hardly any of the original code remains.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000469
470BUGS
471 Probably. See ":help todo" for a list of known problems.
472
Christian Brabandtce6fe842024-06-04 21:58:32 +0200473 Note that a number of things that may be regarded as bugs by some, are
474 in fact caused by a too-faithful reproduction of Vi's behaviour. And
475 if you think other things are bugs "because Vi does it differently",
476 you should take a closer look at the vi_diff.txt file (or type :help
477 vi_diff.txt when in Vim). Also have a look at the 'compatible' and
Bram Moolenaar071d4272004-06-13 20:20:40 +0000478 'cpoptions' options.
479
Foxe Chenb90c2392025-06-27 21:10:35 +0200480 2025 Jun 27 VIM(1)