1 .TH VIM 1 "2006 Apr 11"
3 vim \- Vi IMproved, a programmers text editor
16 [options] \-q [errorfile]
34 is a text editor that is upwards compatible to Vi.
35 It can be used to edit all kinds of plain text.
36 It is especially useful for editing programs.
38 There are a lot of enhancements above Vi: multi level undo,
39 multi windows and buffers, syntax highlighting, command line
40 editing, filename completion, on-line help, visual selection, etc..
41 See ":help vi_diff.txt" for a summary of the differences between
47 a lot of help can be obtained from the on-line help system, with the ":help"
49 See the ON-LINE HELP section below.
53 is started to edit a single file with the command
61 vim [options] [filelist]
63 If the filelist is missing, the editor will start with an empty buffer.
64 Otherwise exactly one out of the following four may be used to choose one or
65 more files to be edited.
69 The first one will be the current file and read into the buffer.
70 The cursor will be positioned on the first line of the buffer.
71 You can get to the other files with the ":next" command.
72 To edit a file that starts with a dash, precede the filelist with "\-\-".
75 The file to edit is read from stdin. Commands are read from stderr, which
79 The file to edit and the initial cursor position depends on a "tag", a sort
81 {tag} is looked up in the tags file, the associated file becomes the current
82 file and the associated command is executed.
83 Mostly this is used for C programs, in which case {tag} could be a function
85 The effect is that the file containing that function becomes the current file
86 and the cursor is positioned on the start of the function.
87 See ":help tag\-commands".
90 Start in quickFix mode.
91 The file [errorfile] is read and the first error is displayed.
92 If [errorfile] is omitted, the filename is obtained from the 'errorfile'
93 option (defaults to "AztecC.Err" for the Amiga, "errors.err" on other
95 Further errors can be jumped to with the ":cn" command.
99 behaves differently, depending on the name of the command (the executable may
100 still be the same file).
103 The "normal" way, everything is default.
107 Go to Normal mode with the ":vi" command.
108 Can also be done with the "\-e" argument.
111 Start in read-only mode. You will be protected from writing the files. Can
112 also be done with the "\-R" argument.
117 Can also be done with the "\-g" argument.
120 The GUI version in easy mode.
122 Can also be done with the "\-y" argument.
124 rvim rview rgvim rgview
125 Like the above, but with restrictions. It will not be possible to start shell
128 Can also be done with the "\-Z" argument.
130 The options may be given in any order, before or after filenames.
131 Options without an argument can be combined after a single dash.
134 For the first file the cursor will be positioned on line "num".
135 If "num" is missing, the cursor will be positioned on the last line.
138 For the first file the cursor will be positioned on the
139 first occurrence of {pat}.
140 See ":help search\-pattern" for the available search patterns.
145 {command} will be executed after the
146 first file has been read.
147 {command} is interpreted as an Ex command.
148 If the {command} contains spaces it must be enclosed in double quotes (this
149 depends on the shell that is used).
150 Example: Vim "+set si" main.c
152 Note: You can use up to 10 "+" or "\-c" commands.
155 {file} will be sourced after the first file has been read.
156 This is equivalent to \-c "source {file}".
157 {file} cannot start with '\-'.
158 If {file} is omitted "Session.vim" is used (only works when \-S is the last
162 Like using "\-c", but the command is executed just before
163 processing any vimrc file.
164 You can use up to 10 of these commands, independently from "\-c" commands.
169 has been compiled with ARABIC support for editing right-to-left
170 oriented files and Arabic keyboard mapping, this option starts
172 in Arabic mode, i.e. 'arabic' is set. Otherwise an error
179 A few options will be set that makes it possible to edit a binary or
183 Compatible. Set the 'compatible' option.
186 behave mostly like Vi, even though a .vimrc file exists.
190 There should be two or three file name arguments.
192 will open all the files and show differences between them.
193 Works like vimdiff(1).
196 Open {device} for use as a terminal.
199 "\-d con:20/30/600/150".
202 Debugging. Go to debugging mode when executing the first command from a
208 in Ex mode, just like the executable was called "ex".
213 in improved Ex mode, just like the executable was called "exim".
216 Foreground. For the GUI version,
218 will not fork and detach from the shell it was started in.
221 is not restarted to open a new window.
222 This option should be used when
224 is executed by a program that will wait for the edit
225 session to finish (e.g. mail).
226 On the Amiga the ":sh" and ":!" commands will not work.
229 Foreground. For the GUI version,
231 will not fork and detach from the shell it was started in.
236 has been compiled with FKMAP support for editing right-to-left
237 oriented files and Farsi keyboard mapping, this option starts
239 in Farsi mode, i.e. 'fkmap' and 'rightleft' are set.
240 Otherwise an error message is given and
247 has been compiled with GUI support, this option enables the GUI.
248 If no GUI support was compiled in, an error message is given and
253 Give a bit of help about the command line arguments and options.
261 has been compiled with RIGHTLEFT support for editing right-to-left
262 oriented files and Hebrew keyboard mapping, this option starts
264 in Hebrew mode, i.e. 'hkmap' and 'rightleft' are set.
265 Otherwise an error message is given and
270 When using the viminfo file is enabled, this option sets the filename to use,
271 instead of the default "~/.viminfo".
272 This can also be used to skip the use of the .viminfo file, by giving the name
280 Sets the 'lisp' and 'showmatch' options on.
283 Modifying files is disabled.
284 Resets the 'write' option.
285 You can still modify the buffer, but writing a file is not possible.
288 Modifications not allowed. The 'modifiable' and 'write' options will be unset,
289 so that changes are not allowed and files can not be written. Note that these
290 options can be set to enable making modifications.
293 No-compatible mode. Reset the 'compatible' option.
296 behave a bit better, but less Vi compatible, even though a .vimrc file does
300 No swap file will be used.
301 Recovery after a crash will be impossible.
302 Handy if you want to edit a file on a very slow medium (e.g. floppy).
303 Can also be done with ":set uc=0".
304 Can be undone with ":set uc=200".
307 Become an editor server for NetBeans. See the docs for details.
310 Open N windows stacked.
311 When N is omitted, open one window for each file.
314 Open N windows side by side.
315 When N is omitted, open one window for each file.
319 When N is omitted, open one tab page for each file.
323 The 'readonly' option will be set.
324 You can still edit the buffer, but will be prevented from accidently
326 If you do want to overwrite a file, add an exclamation mark to the Ex command,
328 The \-R option also implies the \-n option (see below).
329 The 'readonly' option can be reset with ":set noro".
330 See ":help 'readonly'".
333 List swap files, with information about using them for recovery.
337 The swap file is used to recover a crashed editing session.
338 The swap file is a file with the same filename as the text file with ".swp"
340 See ":help recovery".
343 Silent mode. Only when started as "Ex" or when the "\-e" option was given
344 before the "\-s" option.
347 The script file {scriptin} is read.
348 The characters in the file are interpreted as if you had typed them.
349 The same can be done with the command ":source! {scriptin}".
350 If the end of the file is reached before the editor exits, further characters
351 are read from the keyboard.
356 the name of the terminal you are using.
357 Only required when the automatic way doesn't work.
358 Should be a terminal known
361 (builtin) or defined in the termcap or terminfo file.
364 Use the commands in the file {vimrc} for initializations.
365 All the other initializations are skipped.
366 Use this to edit a special kind of files.
367 It can also be used to skip all initializations by giving the name "NONE".
368 See ":help initialization" within vim for more details.
371 Use the commands in the file {gvimrc} for GUI initializations.
372 All the other GUI initializations are skipped.
373 It can also be used to skip all GUI initializations by giving the name "NONE".
374 See ":help gui\-init" within vim for more details.
377 Verbose. Give messages about which files are sourced and for reading and
378 writing a viminfo file. The optional number N is the value for 'verbose'.
384 in Vi mode, just like the executable was called "vi". This only has effect
385 when the executable is called "ex".
388 All the characters that you type are recorded in the file
389 {scriptout}, until you exit
391 This is useful if you want to create a script file to be used with "vim \-s" or
393 If the {scriptout} file exists, characters are appended.
396 Like \-w, but an existing file is overwritten.
399 Use encryption when writing files. Will prompt for a crypt key.
402 Don't connect to the X server. Shortens startup time in a terminal, but the
403 window title and clipboard will not be used.
408 in easy mode, just like the executable was called "evim" or "eview".
411 behave like a click-and-type editor.
414 Restricted mode. Works like the executable starts with "r".
417 Denotes the end of the options.
418 Arguments after this will be handled as a file name.
419 This can be used to edit a filename that starts with a '\-'.
422 GTK GUI only: Echo the Window ID on stdout.
425 Give a help message and exit, just like "\-h".
428 Take file name arguments literally, do not expand wildcards. This has no
429 effect on Unix where the shell expands wildcards.
432 Skip loading plugins. Implied by \-u NONE.
435 Connect to a Vim server and make it edit the files given in the rest of the
436 arguments. If no server is found a warning is given and the files are edited
439 \-\-remote\-expr {expr}
440 Connect to a Vim server, evaluate {expr} in it and print the result on stdout.
442 \-\-remote\-send {keys}
443 Connect to a Vim server and send {keys} to it.
446 As \-\-remote, but without the warning when no server is found.
449 As \-\-remote, but Vim does not exit until the files have been edited.
451 \-\-remote\-wait\-silent
452 As \-\-remote\-wait, but without the warning when no server is found.
455 List the names of all Vim servers that can be found.
457 \-\-servername {name}
458 Use {name} as the server name. Used for the current Vim, unless used with a
459 \-\-remote argument, then it's the name of the server to connect to.
462 GTK GUI only: Use the GtkPlug mechanism to run gvim in another window.
465 Print version information and exit.
470 Type ":help subject" to get help on a specific subject.
471 For example: ":help ZZ" to get help for the "ZZ" command.
472 Use <Tab> and CTRL-D to complete subjects (":help cmdline\-completion").
473 Tags are present to jump from one place to another (sort of hypertext links,
475 All documentation files can be viewed in this way, for example
479 /usr/local/lib/vim/doc/*.txt
483 Use ":help doc\-file\-list" to get the complete list.
485 /usr/local/lib/vim/doc/tags
486 The tags file used for finding information in the documentation files.
488 /usr/local/lib/vim/syntax/syntax.vim
489 System wide syntax initializations.
491 /usr/local/lib/vim/syntax/*.vim
492 Syntax files for various languages.
494 /usr/local/lib/vim/vimrc
504 /usr/local/lib/vim/gvimrc
505 System wide gvim initializations.
508 Your personal gvim initializations.
510 /usr/local/lib/vim/optwin.vim
511 Script used for the ":options" command, a nice way to view and set options.
513 /usr/local/lib/vim/menu.vim
514 System wide menu initializations for gvim.
516 /usr/local/lib/vim/bugreport.vim
517 Script to generate a bug report. See ":help bugs".
519 /usr/local/lib/vim/filetype.vim
520 Script to detect the type of a file by its name. See ":help 'filetype'".
522 /usr/local/lib/vim/scripts.vim
523 Script to detect the type of a file by its contents. See ":help 'filetype'".
525 /usr/local/lib/vim/*.ps
526 Files used for PostScript printing.
528 For recent info read the VIM home page:
530 <URL:http://www.vim.org/>
536 was made by Bram Moolenaar, with a lot of help from others.
537 See ":help credits" in
541 is based on Stevie, worked on by: Tim Thompson,
542 Tony Andrews and G.R. (Fred) Walter.
543 Although hardly any of the original code remains.
546 See ":help todo" for a list of known problems.
548 Note that a number of things that may be regarded as bugs by some, are in fact
549 caused by a too-faithful reproduction of Vi's behaviour.
550 And if you think other things are bugs "because Vi does it differently",
551 you should take a closer look at the vi_diff.txt file (or type :help
552 vi_diff.txt when in Vim).
553 Also have a look at the 'compatible' and 'cpoptions' options.