Penguin
Annotated edit history of vi(1) version 3, including all changes. View license author blame.
Rev Author # Line
1 perry 1 VIM
2 !!!VIM
3 PerryLorier 3 See ViNotes
1 perry 4 !!NAME
5
6
7 vim - Vi IMproved, a programmers text editor
8 !!SYNOPSIS
9
10
11 __vim__ [[options] [[file ..]__
12 vim__ [[options] -__
13 vim__ [[options] -t tag__
14 vim__ [[options] -q [[errorfile]
15
16
17 __ex
18 view
19 gvim gview
20 rvim rview rgvim rgview__
21 !!DESCRIPTION
22
23
24 __Vim__ is a text editor that is upwards compatible to
25 Vi. It can be used to edit all kinds of plain text. It is
26 especially useful for editing programs.
27
28
29 There are a lot of enhancements above Vi: multi level undo,
30 multi windows and buffers, syntax highlighting, command line
31 editing, filename completion, on-line help, visual
32 selection, etc.. See
33 Vim__ and
34 Vi.
35
36
37 While running __Vim__ a lot of help can be obtained from
38 the on-line help system, with the
39 __
40
41
42 Most often __Vim__ is started to edit a single file with
43 the command
44
45
46 vim file
47
48
49 More generally __Vim__ is started with:
50
51
52 vim [[options] [[filelist]
53
54
55 If the filelist is missing, the editor will start with an
56 empty buffer. Otherwise exactly one out of the following
57 four may be used to choose one or more files to be
58 edited.
59
60
61 file ..
62
63
64 A list of filenames. The first one will be the current file
65 and read into the buffer. The cursor will be positioned on
66 the first line of the buffer. You can get to the other files
67 with the
68
69
70 - The file to edit is read from stdin. Commands are read
71 from stderr, which should be a tty.
72
73
74 -t {tag}
75
76
77 The file to edit and the initial cursor position depends on
78 a
79
80
81 -q [[errorfile]
82
83
84 Start in quickFix mode. The file [[errorfile] is read and the
85 first error is displayed. If [[errorfile] is omitted, the
86 filename is obtained from the 'errorfile' option (defaults
87 to
88
89
90 __Vim__ behaves differently, depending on the name of the
91 command (the executable may still be the same
92 file).
93
94
95 vim
96
97
98 The
99
100
101 ex Start in Ex mode. Go to Normal mode with the
102
103
104 view
105
106
107 Start in read-only mode. You will be protected from writing
108 the files. Can also be done with the
109
110
111 gvim gview
112
113
114 The GUI version. Starts a new window. Can also be done with
115 the
116
117
118 rvim rview rgvim rgview
119
120
121 Like the above, but with restrictions. It will not be
122 possible to start shell commands, or suspend __Vim.__ Can
123 also be done with the __
124 !!OPTIONS
125
126
127 The options may be given in any order, before or after
128 filenames. Options without an argument can be combined after
129 a single dash.
130
131
132 +[[num]
133
134
135 For the first file the cursor will be positioned on line
136
137
138 +/{pat}
139
140
141 For the first file the cursor will be positioned on the
142 first occurrence of {pat}. See
143
144
145 +{command}
146
147
148 -c {command}
149
150
151 {command} will be executed after the first file has been
152 read. {command} is interpreted as an Ex command. If the
153 {command} contains spaces it must be enclosed in double
154 quotes (this depends on the shell that is used). Example:
155 Vim
156 Note: You can use up to 10
157
158
159 --cmd {command}
160
161
162 Like using
163
164
165 -b Binary mode. A few options will be set that makes it
166 possible to edit a binary or executable file.
167
168
169 -C Compatible. Set the 'compatible' option. This will make
170 __Vim__ behave mostly like Vi, even though a .vimrc file
171 exists.
172
173
174 -d Start in diff mode. There should be two or three file
175 name arguments. __Vim__ will open all the files and show
176 differences between them. Works like
177 vimdiff(1).
178
179
180 -d {device}
181
182
183 Open {device} for use as a terminal. Only on the Amiga.
184 Example:
185
186
187 -e Start __Vim__ in Ex mode, just like the executable was
188 called __
189
190
191 -f Foreground. For the GUI version, __Vim__ will not fork
192 and detach from the shell it was started in. On the Amiga,
193 __Vim__ is not restarted to open a new window. This
194 option should be used when __Vim__ is executed by a
195 program that will wait for the edit session to finish (e.g.
196 mail). On the Amiga the
197 __
198
199
200 -F If __Vim__ has been compiled with FKMAP support for
201 editing right-to-left oriented files and Farsi keyboard
202 mapping, this option starts __Vim__ in Farsi mode, i.e.
203 'fkmap' and 'rightleft' are set. Otherwise an error message
204 is given and __Vim__ aborts.
205
206
207 -g If __Vim__ has been compiled with GUI support, this
208 option enables the GUI. If no GUI support was compiled in,
209 an error message is given and __Vim__
210 aborts.
211
212
213 -h Give a bit of help about the command line arguments and
214 options. After this __Vim__ exits.
215
216
217 -H If __Vim__ has been compiled with RIGHTLEFT support
218 for editing right-to-left oriented files and Hebrew keyboard
219 mapping, this option starts __Vim__ in Hebrew mode, i.e.
220 'hkmap' and 'rightleft' are set. Otherwise an error message
221 is given and __Vim__ aborts.
222
223
224 -i {viminfo}
225
226
227 When using the viminfo file is enabled, this option sets the
228 filename to use, instead of the default
229
230
231 -L Same as -r.
232
233
234 -l Lisp mode. Sets the 'lisp' and 'showmatch' options
235 on.
236
237
238 -m Modifying files is disabled. Resets the 'write' option,
239 so that writing files is not possible.
240
241
242 -N No-compatible mode. Reset the 'compatible' option. This
243 will make __Vim__ behave a bit better, but less Vi
244 compatible, even though a .vimrc file does not
245 exist.
246
247
248 -n No swap file will be used. Recovery after a crash will be
249 impossible. Handy if you want to edit a file on a very slow
250 medium (e.g. floppy). Can also be done with
251
252
253 -o[[N]
254
255
256 Open N windows. When N is omitted, open one window for each
257 file.
258
259
260 -R Read-only mode. The 'readonly' option will be set. You
261 can still edit the buffer, but will be prevented from
262 accidently overwriting a file. If you do want to overwrite a
263 file, add an exclamation mark to the Ex command, as in
264
265
266 -r List swap files, with information about using them for
267 recovery.
268
269
270 -r {file}
271
272
273 Recovery mode. The swap file is used to recover a crashed
274 editing session. The swap file is a file with the same
275 filename as the text file with
276
277
278 -s Silent mode. Only when started as
279
280
281 -s {scriptin}
282
283
284 The script file {scriptin} is read. The characters in the
285 file are interpreted as if you had typed them. The same can
286 be done with the command
287
288
289 -T {terminal}
290
291
292 Tells __Vim__ the name of the terminal you are using.
293 Only required when the automatic way doesn't work. Should be
294 a terminal known to __Vim__ (builtin) or defined in the
295 termcap or terminfo file.
296
297
298 -u {vimrc}
299
300
301 Use the commands in the file {vimrc} for initializations.
302 All the other initializations are skipped. Use this to edit
303 a special kind of files. It can also be used to skip all
304 initializations by giving the name
305
306
307 -U {gvimrc}
308
309
310 Use the commands in the file {gvimrc} for GUI
311 initializations. All the other GUI initializations are
312 skipped. It can also be used to skip all GUI initializations
313 by giving the name
314
315
316 -V Verbose. Give messages about which files are sourced and
317 for reading and writing a viminfo file.
318
319
320 -v Start __Vim__ in Vi mode, just like the executable was
321 called
322 __
323
324
325 -w {scriptout}
326
327
328 All the characters that you type are recorded in the file
329 {scriptout}, until you exit __Vim.__ This is useful if
330 you want to create a script file to be used with
331 __
332
333
334 -W {scriptout}
335
336
337 Like -w, but an existing file is overwritten.
338
339
340 -x Use encryption when writing files. Will prompt for a
341 crypt key.
342
343
344 -Z Restricted mode. Works like the executable starts with
345
346
347 -- Denotes the end of the options. Arguments after this will
348 be handled as a file name. This can be used to edit a
349 filename that starts with a '-'.
350
351
352 --help
353
354
355 Give a help message and exit, just like
356
357
358 --version
359
360
361 Print version information and exit.
362
363
364 --remote
365
366
367 Connect to a Vim server and make it edit the files given in
368 the rest of the arguments.
369
370
371 --serverlist
372
373
374 List the names of all Vim servers that can be
375 found.
376
377
378 --servername {name}
379
380
381 Use {name} as the server name. Used for the current Vim,
382 unless used with a --serversend or --remote, then it's the
383 name of the server to connect to.
384
385
386 --serversend {keys}
387
388
389 Connect to a Vim server and send {keys} to it.
390
391
392 --socketid {id}
393
394
2 perry 395 GTK GUI only: Use the !GtkPlug mechanism to run gvim in
1 perry 396 another window.
397
398
399 --echo-wid
400
401
402 GTK GUI only: Echo the Window ID on stdout
403 !!ON-LINE HELP
404
405
406 Type Vim__ to get started. Type
407 __
408 !!FILES
409
410
411 /usr/share/vim/vim61/doc/*.txt
412
413
414 The __Vim__ documentation files. Use
415 __
416
417
418 /usr/share/vim/vim61/doc/tags
419
420
421 The tags file used for finding information in the
422 documentation files.
423
424
425 /usr/share/vim/vim61/syntax/syntax.vim
426
427
428 System wide syntax initializations.
429
430
431 /usr/share/vim/vim61/syntax/*.vim
432
433
434 Syntax files for various languages.
435
436
437 /usr/share/vim/vimrc
438
439
440 System wide __Vim__ initializations.
441
442
443 /usr/share/vim/gvimrc
444
445
446 System wide gvim initializations.
447
448
449 /usr/share/vim/vim61/optwin.vim
450
451
452 Script used for the
453
454
455 /usr/share/vim/vim61/menu.vim
456
457
458 System wide menu initializations for gvim.
459
460
461 /usr/share/vim/vim61/bugreport.vim
462
463
464 Script to generate a bug report. See
465
466
467 /usr/share/vim/vim61/filetype.vim
468
469
470 Script to detect the type of a file by its name. See
471
472
473 /usr/share/vim/vim61/scripts.vim
474
475
476 Script to detect the type of a file by its contents. See
477
478
479 /usr/share/vim/vim61/*.ps
480
481
2 perry 482 Files used for !PostScript printing.
1 perry 483
484
485 For recent info read the VIM home page:
486 !!SEE ALSO
487
488
489 vimtutor(1)
490 !!AUTHOR
491
492
493 Most of __Vim__ was made by Bram Moolenaar, with a lot of
494 help from others. See
495 __Vim.
496 Vim__ is based on Stevie, worked on by: Tim Thompson, Tony
497 Andrews and G.R. (Fred) Walter. Although hardly any of the
498 original code remains.
499 !!BUGS
500
501
502 Probably. See
503
504
505 Note that a number of things that may be regarded as bugs by
506 some, are in fact caused by a too-faithful reproduction of
507 Vi's behaviour. And if you think other things are bugs
508 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.