blob: 46db57a458307d59075b0b48374d716524803d3e [file] [log] [blame]
Christian Brabandtf2b16982025-03-29 09:08:58 +01001*vi_diff.txt* For Vim version 9.1. Last change: 2025 Mar 28
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7Differences between Vim and Vi *vi-differences*
8
Bram Moolenaar25c9c682019-05-05 18:13:34 +02009This file lists the differences between Vim and Vi/Ex and gives an overview of
10what is in Vim that is not in Vi.
Bram Moolenaar071d4272004-06-13 20:20:40 +000011
12Vim is mostly POSIX 1003.2-1 compliant. The only command known to be missing
13is ":open". There are probably a lot of small differences (either because Vim
14is missing something or because Posix is beside the mark).
15
Bram Moolenaar6bdcfc02005-02-22 08:28:13 +0000161. Simulated command |simulated-command|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000172. Missing options |missing-options|
183. Limits |limits|
194. The most interesting additions |vim-additions|
205. Other vim features |other-features|
Bram Moolenaar6c60f472019-04-28 16:00:35 +0200216. Supported Vi features |vi-features|
227. Command-line arguments |cmdline-arguments|
238. POSIX compliance |posix-compliance|
Christian Brabandt18defab2024-11-10 20:10:42 +0100249. Supported Operating Systems |os-support|
Bram Moolenaar071d4272004-06-13 20:20:40 +000025
26==============================================================================
Bram Moolenaar6bdcfc02005-02-22 08:28:13 +0000271. Simulated command *simulated-command*
Bram Moolenaar071d4272004-06-13 20:20:40 +000028
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +000029This command is in Vi, but Vim only simulates it:
Bram Moolenaar071d4272004-06-13 20:20:40 +000030
Bram Moolenaar6bdcfc02005-02-22 08:28:13 +000031 *:o* *:op* *:open*
32:[range]o[pen] Works like |:visual|: end Ex mode.
33 {Vi: start editing in open mode}
34
35:[range]o[pen] /pattern/ As above, additionally move the cursor to the
36 column where "pattern" matches in the cursor
37 line.
38
39Vim does not support open mode, since it's not really useful. For those
40situations where ":open" would start open mode Vim will leave Ex mode, which
41allows executing the same commands, but updates the whole screen instead of
42only one line.
Bram Moolenaar071d4272004-06-13 20:20:40 +000043
44==============================================================================
452. Missing options *missing-options*
46
47These options are in the Unix Vi, but not in Vim. If you try to set one of
48them you won't get an error message, but the value is not used and cannot be
49printed.
50
51autoprint (ap) boolean (default on) *'autoprint'* *'ap'*
52beautify (bf) boolean (default off) *'beautify'* *'bf'*
Cthulhux93e0d2e2024-05-15 20:53:52 +020053flash (fl) boolean (default on) *'flash'* *'fl'*
Bram Moolenaar071d4272004-06-13 20:20:40 +000054graphic (gr) boolean (default off) *'graphic'* *'gr'*
55hardtabs (ht) number (default 8) *'hardtabs'* *'ht'*
56 number of spaces that a <Tab> moves on the display
57mesg boolean (default on) *'mesg'*
58novice boolean (default off) *'novice'*
59open boolean (default on) *'open'*
60optimize (op) boolean (default off) *'optimize'* *'op'*
Bram Moolenaar071d4272004-06-13 20:20:40 +000061redraw boolean (default off) *'redraw'*
62slowopen (slow) boolean (default off) *'slowopen'* *'slow'*
63sourceany boolean (default off) *'sourceany'*
Bram Moolenaar071d4272004-06-13 20:20:40 +000064w300 number (default 23) *'w300'*
65w1200 number (default 23) *'w1200'*
66w9600 number (default 23) *'w9600'*
67
Bram Moolenaar2e693a82019-10-16 22:35:02 +020068Vi did not allow for changing the termcap entries, you would have to exit Vi,
69edit the termcap entry and try again. Vim has the |terminal-options|.
70
Bram Moolenaar071d4272004-06-13 20:20:40 +000071==============================================================================
723. Limits *limits*
73
74Vim has only a few limits for the files that can be edited {Vi: can not handle
75<Nul> characters and characters above 128, has limited line length, many other
76limits}.
Bram Moolenaar98a29d02021-01-18 19:55:44 +010077
Bram Moolenaar5666fcd2019-12-26 14:35:26 +010078Maximum line length 2147483647 characters. Longer lines are split.
Bram Moolenaar071d4272004-06-13 20:20:40 +000079Maximum number of lines 2147483647 lines.
80Maximum file size 2147483647 bytes (2 Gbyte) when a long integer is
81 32 bits. Much more for 64 bit longs. Also limited
82 by available disk space for the |swap-file|.
83 *E75*
84Length of a file path Unix and Win32: 1024 characters, otherwise 256
85 characters (or as much as the system supports).
86Length of an expanded string option
87 Unix and Win32: 1024 characters, otherwise 256
88 characters
89Maximum display width Unix and Win32: 1024 characters, otherwise 255
90 characters
91Maximum lhs of a mapping 50 characters.
Bram Moolenaar4770d092006-01-12 23:22:24 +000092Number of different highlighting types: over 30000
Bram Moolenaar5302d9e2011-09-14 17:55:08 +020093Range of a Number variable: -2147483648 to 2147483647 (might be more on 64
Christian Brabandtf2b16982025-03-29 09:08:58 +010094 bit systems) See also: |v:numbermax|,
95 |v:numbermin| and |v:numbersize|
Bram Moolenaar4a748032010-09-30 21:47:56 +020096Maximum length of a line in a tags file: 512 bytes.
Christian Brabandtf2b16982025-03-29 09:08:58 +010097 *E1541*
98Maximum value for |/\U| and |/\%U|: 2147483647 (for 32bit integer).
Bram Moolenaar071d4272004-06-13 20:20:40 +000099
100Information for undo and text in registers is kept in memory, thus when making
101(big) changes the amount of (virtual) memory available limits the number of
102undo levels and the text that can be kept in registers. Other things are also
103kept in memory: Command-line history, error messages for Quickfix mode, etc.
104
105Memory usage limits
106-------------------
107
108The option 'maxmem' ('mm') is used to set the maximum memory used for one
109buffer (in kilobytes). 'maxmemtot' is used to set the maximum memory used for
110all buffers (in kilobytes). The defaults depend on the system used. For the
Bram Moolenaar5666fcd2019-12-26 14:35:26 +0100111Amiga, 'maxmemtot' is set depending on the amount of memory available.
Bram Moolenaar18144c82006-04-12 21:52:12 +0000112These are not hard limits, but tell Vim when to move text into a swap file.
113If you don't like Vim to swap to a file, set 'maxmem' and 'maxmemtot' to a
114very large value. The swap file will then only be used for recovery. If you
115don't want a swap file at all, set 'updatecount' to 0, or use the "-n"
116argument when starting Vim.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000117
118==============================================================================
1194. The most interesting additions *vim-additions*
120
121Vi compatibility. |'compatible'|
122 Although Vim is 99% Vi compatible, some things in Vi can be
123 considered to be a bug, or at least need improvement. But still, Vim
124 starts in a mode which behaves like the "real" Vi as much as possible.
125 To make Vim behave a little bit better, try resetting the 'compatible'
Milly89872f52024-10-05 17:16:18 +0200126 option: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000127 :set nocompatible
Milly89872f52024-10-05 17:16:18 +0200128< Or start Vim with the "-N" argument: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000129 vim -N
Milly89872f52024-10-05 17:16:18 +0200130< Vim starts with 'nocompatible' automatically if you have a .vimrc
Bram Moolenaar18144c82006-04-12 21:52:12 +0000131 file. See |startup|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000132 The 'cpoptions' option can be used to set Vi compatibility on/off for
133 a number of specific items.
134
135Support for different systems.
136 Vim can be used on:
137 - All Unix systems (it works on all systems it was tested on, although
138 the GUI and Perl interface may not work everywhere).
139 - Amiga (500, 1000, 1200, 2000, 3000, 4000, ...).
Bram Moolenaar8024f932020-01-14 19:29:13 +0100140 - MS-Windows
Bram Moolenaar071d4272004-06-13 20:20:40 +0000141 - VMS
Bram Moolenaar071d4272004-06-13 20:20:40 +0000142 - Macintosh
Bram Moolenaar071d4272004-06-13 20:20:40 +0000143 - IBM OS/390
Bram Moolenaar18144c82006-04-12 21:52:12 +0000144 Note that on some systems features need to be disabled to reduce
Bram Moolenaar5666fcd2019-12-26 14:35:26 +0100145 resource usage. For some outdated systems you need to use an older
146 Vim version.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000147
Bram Moolenaardc1f1642016-08-16 18:33:43 +0200148Multi level persistent undo. |undo|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000149 'u' goes backward in time, 'CTRL-R' goes forward again. Set option
150 'undolevels' to the number of changes to be remembered (default 1000).
Bram Moolenaar7cba6c02013-09-05 22:13:31 +0200151 Set 'undolevels' to 0 for a Vi-compatible one level undo. Set it to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000152 -1 for no undo at all.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000153 When all changes in a buffer have been undone, the buffer is not
154 considered changed anymore. You can exit it with :q, without <!>.
Bram Moolenaar18144c82006-04-12 21:52:12 +0000155 When undoing a few changes and then making a new change Vim will
156 create a branch in the undo tree. This means you can go back to any
Bram Moolenaar143c38c2007-05-10 16:41:10 +0000157 state of the text, there is no risk of a change causing text to be
Bram Moolenaar18144c82006-04-12 21:52:12 +0000158 lost forever. |undo-tree|
Bram Moolenaardc1f1642016-08-16 18:33:43 +0200159 The undo information is stored in a file when the 'undofile' option is
160 set. This means you can exit Vim, start Vim on a previously edited
161 file and undo changes that were made before exiting Vim.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000162
Bram Moolenaar18144c82006-04-12 21:52:12 +0000163Graphical User Interface (GUI). |gui|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000164 Included support for GUI: menu's, mouse, scrollbars, etc. You can
165 define your own menus. Better support for CTRL/SHIFT/ALT keys in
166 combination with special keys and mouse. Supported for various
Bram Moolenaarcbaff5e2022-04-08 17:45:08 +0100167 platforms, such as X11 with Motif, GTK, Win32 (Windows XP and later),
168 Amiga and Macintosh.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000169
170Multiple windows and buffers. |windows.txt|
171 Vim can split the screen into several windows, each editing a
172 different buffer or the same buffer at a different location. Buffers
173 can still be loaded (and changed) but not displayed in a window. This
174 is called a hidden buffer. Many commands and options have been added
175 for this facility.
Bram Moolenaar18144c82006-04-12 21:52:12 +0000176 Vim can also use multiple tab pages, each with one or more windows. A
177 line with tab labels can be used to quickly switch between these pages.
178 |tab-page|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000179
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200180Terminal window. |:terminal|
181 Vim can create a window in which a terminal emulator runs. This can
182 be used to execute an arbitrary command, a shell or a debugger.
183
Bram Moolenaar071d4272004-06-13 20:20:40 +0000184Syntax highlighting. |:syntax|
185 Vim can highlight keywords, patterns and other things. This is
Bram Moolenaar18144c82006-04-12 21:52:12 +0000186 defined by a number of |:syntax| commands, and can be made to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000187 highlight most languages and file types. A number of files are
188 included for highlighting the most common languages, like C, C++,
189 Java, Pascal, Makefiles, shell scripts, etc. The colors used for
190 highlighting can be defined for ordinary terminals, color terminals
Bram Moolenaar18144c82006-04-12 21:52:12 +0000191 and the GUI with the |:highlight| command. A convenient way to do
192 this is using a |:colorscheme| command.
193 The highlighted text can be exported as HTML. |convert-to-HTML|
194 Other items that can be highlighted are matches with the search string
195 |'hlsearch'|, matching parens |matchparen| and the cursor line and
196 column |'cursorline'| |'cursorcolumn'|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000197
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200198Text properties |textprop.txt|
199 Vim supports highlighting text by a plugin. Property types can be
Bram Moolenaar68e65602019-05-26 21:33:31 +0200200 specified with |prop_type_add()| and properties can be placed with
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200201 |prop_add()|.
202
Bram Moolenaar18144c82006-04-12 21:52:12 +0000203Spell checking. |spell|
204 When the 'spell' option is set Vim will highlight spelling mistakes.
Bram Moolenaar9b451252012-08-15 17:43:31 +0200205 About 50 languages are currently supported, selected with the
Bram Moolenaarf2330482008-06-24 20:19:36 +0000206 'spelllang' option. In source code only comments and strings are
Bram Moolenaar18144c82006-04-12 21:52:12 +0000207 checked for spelling.
208
209Folding. |folding|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000210 A range of lines can be shown as one "folded" line. This allows
211 overviewing a file and moving blocks of text around quickly.
212 Folds can be created manually, from the syntax of the file, by indent,
213 etc.
214
Bram Moolenaar18144c82006-04-12 21:52:12 +0000215Diff mode. |diff|
216 Vim can show two versions of a file with the differences highlighted.
217 Parts of the text that are equal are folded away. Commands can be
218 used to move text from one version to the other.
219
220Plugins. |add-plugin|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000221 The functionality can be extended by dropping a plugin file in the
222 right directory. That's an easy way to start using Vim scripts
223 written by others. Plugins can be for all kind of files, or
224 specifically for a filetype.
Bram Moolenaardc1f1642016-08-16 18:33:43 +0200225 Packages make this even easier. |packages|
226
227Asynchronous communication and timers. |channel| |job| |timer|
228 Vim can exchange messages with other processes in the background.
229 This makes it possible to have servers do work and send back the
230 results to Vim. |channel|
231 Vim can start a job, communicate with it and stop it. |job|
232 Timers can fire once or repeatedly and invoke a function to do any
233 work. |timer|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000234
235Repeat a series of commands. |q|
Bram Moolenaar18144c82006-04-12 21:52:12 +0000236 "q{c}" starts recording typed characters into named register {c}.
237 A subsequent "q" stops recording. The register can then be executed
238 with the "@{c}" command. This is very useful to repeat a complex
239 action.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000240
241Flexible insert mode. |ins-special-special|
242 The arrow keys can be used in insert mode to move around in the file.
243 This breaks the insert in two parts as far as undo and redo is
244 concerned.
245
Bram Moolenaar18144c82006-04-12 21:52:12 +0000246 CTRL-O can be used to execute a single Normal mode command. This is
247 almost the same as hitting <Esc>, typing the command and doing |a|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000248
249Visual mode. |Visual-mode|
Bram Moolenaar18144c82006-04-12 21:52:12 +0000250 Visual mode can be used to first highlight a piece of text and then
251 give a command to do something with it. This is an (easy to use)
252 alternative to first giving the operator and then moving to the end of
253 the text to be operated upon.
254 |v| and |V| are used to start Visual mode. |v| works on characters
255 and |V| on lines. Move the cursor to extend the Visual area. It is
256 shown highlighted on the screen. By typing "o" the other end of the
257 Visual area can be moved. The Visual area can be affected by an
258 operator:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000259 d delete
260 c change
261 y yank
262 > or < insert or delete indent
263 ! filter through external program
264 = filter through indent
Bram Moolenaar18144c82006-04-12 21:52:12 +0000265 : start |:| command for the Visual lines.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000266 gq format text to 'textwidth' columns
267 J join lines
268 ~ swap case
269 u make lowercase
270 U make uppercase
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200271 {Vi has no Visual mode, the name "visual" is used for Normal mode, to
272 distinguish it from Ex mode}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000273
274Block operators. |visual-block|
Bram Moolenaar18144c82006-04-12 21:52:12 +0000275 With Visual mode a rectangular block of text can be selected. Start
276 Visual mode with CTRL-V. The block can be deleted ("d"), yanked ("y")
277 or its case can be changed ("~", "u" and "U"). A deleted or yanked
278 block can be put into the text with the "p" and "P" commands.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000279
Bram Moolenaar18144c82006-04-12 21:52:12 +0000280Help system. |:help|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000281 Help is displayed in a window. The usual commands can be used to
282 move around, search for a string, etc. Tags can be used to jump
Bram Moolenaar18144c82006-04-12 21:52:12 +0000283 around in the help files, just like hypertext links. The |:help|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000284 command takes an argument to quickly jump to the info on a subject.
285 <F1> is the quick access to the help system. The name of the help
286 index file can be set with the 'helpfile' option.
287
288Command-line editing and history. |cmdline-editing|
289 You can insert or delete at any place in the command-line using the
290 cursor keys. The right/left cursor keys can be used to move
291 forward/backward one character. The shifted right/left cursor keys
292 can be used to move forward/backward one word. CTRL-B/CTRL-E can be
293 used to go to the begin/end of the command-line.
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200294 {Vi: can only alter the last character in the line}
295 {Vi: when hitting <Esc> the command-line is executed. This is
296 unexpected for most people; therefore it was changed in Vim. But when
297 the <Esc> is part of a mapping, the command-line is executed. If you
298 want the Vi behaviour also when typing <Esc>, use ":cmap ^V<Esc>
299 ^V^M"}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000300 |cmdline-history|
301 The command-lines are remembered. The up/down cursor keys can be used
302 to recall previous command-lines. The 'history' option can be set to
303 the number of lines that will be remembered. There is a separate
304 history for commands and for search patterns.
305
306Command-line completion. |cmdline-completion|
307 While entering a command-line (on the bottom line of the screen)
308 <Tab> can be typed to complete
309 what example ~
310 - command :e<Tab>
311 - tag :ta scr<Tab>
312 - option :set sc<Tab>
313 - option value :set hf=<Tab>
314 - file name :e ve<Tab>
315 - etc.
316
317 If there are multiple matches, CTRL-N (next) and CTRL-P (previous)
318 will walk through the matches. <Tab> works like CTRL-N, but wraps
319 around to the first match.
320
321 The 'wildchar' option can be set to the character for command-line
322 completion, <Tab> is the default. CTRL-D can be typed after an
323 (incomplete) wildcard; all matches will be listed. CTRL-A will insert
324 all matches. CTRL-L will insert the longest common part of the
325 matches.
326
Bram Moolenaar18144c82006-04-12 21:52:12 +0000327Insert-mode completion. |ins-completion|
328 In Insert mode the CTRL-N and CTRL-P keys can be used to complete a
329 word that appears elsewhere. |i_CTRL-N|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000330 With CTRL-X another mode is entered, through which completion can be
331 done for:
332 |i_CTRL-X_CTRL-F| file names
333 |i_CTRL-X_CTRL-K| words from 'dictionary' files
334 |i_CTRL-X_CTRL-T| words from 'thesaurus' files
335 |i_CTRL-X_CTRL-I| words from included files
336 |i_CTRL-X_CTRL-L| whole lines
337 |i_CTRL-X_CTRL-]| words from the tags file
338 |i_CTRL-X_CTRL-D| definitions or macros
Bram Moolenaar18144c82006-04-12 21:52:12 +0000339 |i_CTRL-X_CTRL-O| Omni completion: clever completion
340 specifically for a file type
341 etc.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000342
Bram Moolenaar18144c82006-04-12 21:52:12 +0000343Long line support. |'wrap'| |'linebreak'|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000344 If the 'wrap' option is off, long lines will not wrap and only part
345 of them will be shown. When the cursor is moved to a part that is not
346 shown, the screen will scroll horizontally. The minimum number of
Bram Moolenaar18144c82006-04-12 21:52:12 +0000347 columns to scroll can be set with the 'sidescroll' option. The |zh|
348 and |zl| commands can be used to scroll sideways.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000349 Alternatively, long lines are broken in between words when the
350 'linebreak' option is set. This allows editing a single-line
351 paragraph conveniently (e.g. when the text is later read into a DTP
Bram Moolenaar18144c82006-04-12 21:52:12 +0000352 program). Move the cursor up/down with the |gk| and |gj| commands.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000353
354Text formatting. |formatting|
355 The 'textwidth' option can be used to automatically limit the line
356 length. This supplements the 'wrapmargin' option of Vi, which was not
Bram Moolenaar18144c82006-04-12 21:52:12 +0000357 very useful. The |gq| operator can be used to format a piece of text
358 (for example, |gqap| formats the current paragraph). Commands for
359 text alignment: |:center|, |:left| and |:right|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000360
Bram Moolenaar18144c82006-04-12 21:52:12 +0000361Extended search patterns. |pattern|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000362 There are many extra items to match various text items. Examples:
363 A "\n" can be used in a search pattern to match a line break.
364 "x\{2,4}" matches "x" 2 to 4 times.
365 "\s" matches a white space character.
366
Bram Moolenaar18144c82006-04-12 21:52:12 +0000367Directory, remote and archive browsing. |netrw|
368 Vim can browse the file system. Simply edit a directory. Move around
369 in the list with the usual commands and press <Enter> to go to the
370 directory or file under the cursor.
371 This also works for remote files over ftp, http, ssh, etc.
372 Zip and tar archives can also be browsed. |tar| |zip|
373
Bram Moolenaar071d4272004-06-13 20:20:40 +0000374Edit-compile-edit speedup. |quickfix|
Bram Moolenaar18144c82006-04-12 21:52:12 +0000375 The |:make| command can be used to run the compilation and jump to the
376 first error. A file with compiler error messages is interpreted. Vim
377 jumps to the first error.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000378
379 Each line in the error file is scanned for the name of a file, line
380 number and error message. The 'errorformat' option can be set to a
381 list of scanf-like strings to handle output from many compilers.
382
Bram Moolenaar18144c82006-04-12 21:52:12 +0000383 The |:cn| command can be used to jump to the next error.
384 |:cl| lists all the error messages. Other commands are available.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000385 The 'makeef' option has the name of the file with error messages.
386 The 'makeprg' option contains the name of the program to be executed
Bram Moolenaar18144c82006-04-12 21:52:12 +0000387 with the |:make| command.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000388 The 'shellpipe' option contains the string to be used to put the
389 output of the compiler into the errorfile.
390
Bram Moolenaar18144c82006-04-12 21:52:12 +0000391Finding matches in files. |:vimgrep|
392 Vim can search for a pattern in multiple files. This uses the
393 advanced Vim regexp pattern, works on all systems and also works to
394 search in compressed files.
395
396Improved indenting for programs. |'cindent'|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000397 When the 'cindent' option is on the indent of each line is
398 automatically adjusted. C syntax is mostly recognized. The indent
399 for various styles can be set with 'cinoptions'. The keys to trigger
400 indenting can be set with 'cinkeys'.
401
402 Comments can be automatically formatted. The 'comments' option can be
403 set to the characters that start and end a comment. This works best
404 for C code, but also works for e-mail (">" at start of the line) and
Bram Moolenaar18144c82006-04-12 21:52:12 +0000405 other types of text. The |=| operator can be used to re-indent
Bram Moolenaar071d4272004-06-13 20:20:40 +0000406 lines.
407
Bram Moolenaar18144c82006-04-12 21:52:12 +0000408 For many other languages an indent plugin is present to support
409 automatic indenting. |30.3|
410
411Searching for words in included files. |include-search|
412 The |[i| command can be used to search for a match of the word under
Bram Moolenaar071d4272004-06-13 20:20:40 +0000413 the cursor in the current and included files. The 'include' option
Bram Moolenaarc236c162008-07-13 17:41:49 +0000414 can be set to a pattern that describes a command to include a file
Bram Moolenaar071d4272004-06-13 20:20:40 +0000415 (the default is for C programs).
Bram Moolenaar18144c82006-04-12 21:52:12 +0000416 The |[I| command lists all matches, the |[_CTRL-I| command jumps to
Bram Moolenaar071d4272004-06-13 20:20:40 +0000417 a match.
Bram Moolenaar18144c82006-04-12 21:52:12 +0000418 The |[d|, |[D| and |[_CTRL-D| commands do the same, but only for
Bram Moolenaar071d4272004-06-13 20:20:40 +0000419 lines where the pattern given with the 'define' option matches.
420
Bram Moolenaar18144c82006-04-12 21:52:12 +0000421Automatic commands. |autocommand|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000422 Commands can be automatically executed when reading a file, writing a
423 file, jumping to another buffer, etc., depending on the file name.
424 This is useful to set options and mappings for C programs,
425 documentation, plain text, e-mail, etc. This also makes it possible
426 to edit compressed files.
427
Bram Moolenaar18144c82006-04-12 21:52:12 +0000428Scripts and Expressions. |expression|
429 Commands have been added to form up a powerful script language.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000430 |:if| Conditional execution, which can be used for example
431 to set options depending on the value of $TERM.
432 |:while| Repeat a number of commands.
Bram Moolenaar18144c82006-04-12 21:52:12 +0000433 |:for| Loop over a list.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000434 |:echo| Print the result of an expression.
435 |:let| Assign a value to an internal variable, option, etc.
Bram Moolenaar18144c82006-04-12 21:52:12 +0000436 Variable types are Number, String, List and Dictionary.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000437 |:execute| Execute a command formed by an expression.
Bram Moolenaar18144c82006-04-12 21:52:12 +0000438 |:try| Catch exceptions.
439 etc., etc. See |eval|.
440 Debugging and profiling are supported. |debug-scripts| |profile|
441 If this is not enough, an interface is provided to |Python|, |Ruby|,
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200442 |Tcl|, |Lua|, |Perl| and |MzScheme|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000443
Bram Moolenaar18144c82006-04-12 21:52:12 +0000444Viminfo. |viminfo-file|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000445 The command-line history, marks and registers can be stored in a file
446 that is read on startup. This can be used to repeat a search command
447 or command-line command after exiting and restarting Vim. It is also
Bram Moolenaar18144c82006-04-12 21:52:12 +0000448 possible to jump right back to where the last edit stopped with |'0|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000449 The 'viminfo' option can be set to select which items to store in the
450 .viminfo file. This is off by default.
451
Bram Moolenaar18144c82006-04-12 21:52:12 +0000452Printing. |printing|
453 The |:hardcopy| command sends text to the printer. This can include
454 syntax highlighting.
455
456Mouse support. |mouse-using|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000457 The mouse is supported in the GUI version, in an xterm for Unix, for
Bram Moolenaar5666fcd2019-12-26 14:35:26 +0100458 BSDs with sysmouse, for Linux with gpm, and Win32. It can be used to
459 position the cursor, select the visual area, paste a register, etc.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000460
Bram Moolenaar18144c82006-04-12 21:52:12 +0000461Usage of key names. |<>| |key-notation|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000462 Special keys now all have a name like <Up>, <End>, etc.
463 This name can be used in mappings, to make it easy to edit them.
464
Bram Moolenaar18144c82006-04-12 21:52:12 +0000465Editing binary files. |edit-binary|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000466 Vim can edit binary files. You can change a few characters in an
467 executable file, without corrupting it. Vim doesn't remove NUL
468 characters (they are represented as <NL> internally).
469 |-b| command-line argument to start editing a binary file
Bram Moolenaar18144c82006-04-12 21:52:12 +0000470 |'binary'| Option set by |-b|. Prevents adding an <EOL> for the
Bram Moolenaar071d4272004-06-13 20:20:40 +0000471 last line in the file.
472
Bram Moolenaar18144c82006-04-12 21:52:12 +0000473Multi-language support. |multi-lang|
Bram Moolenaar207f0092020-08-30 17:20:20 +0200474 Files in double-byte or multibyte encodings can be edited. There is
Bram Moolenaar071d4272004-06-13 20:20:40 +0000475 UTF-8 support to be able to edit various languages at the same time,
476 without switching fonts. |UTF-8|
477 Messages and menus are available in different languages.
478
Bram Moolenaar18144c82006-04-12 21:52:12 +0000479Move cursor beyond lines.
480 When the 'virtualedit' option is set the cursor can move all over the
481 screen, also where there is no text. This is useful to edit tables
482 and figures easily.
483
Bram Moolenaar071d4272004-06-13 20:20:40 +0000484==============================================================================
4855. Other vim features *other-features*
486
487A random collection of nice extra features.
488
489
490When Vim is started with "-s scriptfile", the characters read from
491"scriptfile" are treated as if you typed them. If end of file is reached
492before the editor exits, further characters are read from the console.
493
494The "-w" option can be used to record all typed characters in a script file.
495This file can then be used to redo the editing, possibly on another file or
496after changing some commands in the script file.
497
498The "-o" option opens a window for each argument. "-o4" opens four windows.
499
500Vi requires several termcap entries to be able to work full-screen. Vim only
501requires the "cm" entry (cursor motion).
502
503
504In command mode:
505
506When the 'showcmd' option is set, the command characters are shown in the last
507line of the screen. They are removed when the command is finished.
508
509If the 'ruler' option is set, the current cursor position is shown in the
510last line of the screen.
511
512"U" still works after having moved off the last changed line and after "u".
513
514Characters with the 8th bit set are displayed. The characters between '~' and
5150xa0 are displayed as "~?", "~@", "~A", etc., unless they are included in the
516'isprint' option.
517
518"][" goes to the next ending of a C function ('}' in column 1).
519"[]" goes to the previous ending of a C function ('}' in column 1).
520
521"]f", "[f" and "gf" start editing the file whose name is under the cursor.
522CTRL-W f splits the window and starts editing the file whose name is under
523the cursor.
524
525"*" searches forward for the identifier under the cursor, "#" backward.
526"K" runs the program defined by the 'keywordprg' option, with the identifier
527under the cursor as argument.
528
529"%" can be preceded with a count. The cursor jumps to the line that
530percentage down in the file. The normal "%" function to jump to the matching
531brace skips braces inside quotes.
532
533With the CTRL-] command, the cursor may be in the middle of the identifier.
534
535The used tags are remembered. Commands that can be used with the tag stack
536are CTRL-T, ":pop" and ":tag". ":tags" lists the tag stack.
537
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200538Vi uses 'wrapscan' when searching for a tag. When jumping to a tag Vi starts
539searching in line 2 of another file. It does not find a tag in line 1 of
540another file when 'wrapscan' is not set.
541
Bram Moolenaar071d4272004-06-13 20:20:40 +0000542The 'tags' option can be set to a list of tag file names. Thus multiple
543tag files can be used. For file names that start with "./", the "./" is
544replaced with the path of the current file. This makes it possible to use a
545tags file in the same directory as the file being edited.
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200546{Vi: always uses binary search in some versions}
547{Vi does not have the security prevention for commands in tag files}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000548
549Previously used file names are remembered in the alternate file name list.
550CTRL-^ accepts a count, which is an index in this list.
551":files" command shows the list of alternate file names.
552"#<N>" is replaced with the <N>th alternate file name in the list.
553"#<" is replaced with the current file name without extension.
554
555Search patterns have more features. The <NL> character is seen as part of the
556search pattern and the substitute string of ":s". Vi sees it as the end of
557the command.
558
559Searches can put the cursor on the end of a match and may include a character
560offset.
561
562Count added to "~", ":next", ":Next", "n" and "N".
563
564The command ":next!" with 'autowrite' set does not write the file. In vi the
565file was written, but this is considered to be a bug, because one does not
566expect it and the file is not written with ":rewind!".
567
568In Vi when entering a <CR> in replace mode deletes a character only when 'ai'
569is set (but does not show it until you hit <Esc>). Vim always deletes a
570character (and shows it immediately).
571
572Added :wnext command. Same as ":write" followed by ":next".
573
574The ":w!" command always writes, also when the file is write protected. In Vi
Bram Moolenaar26df0922014-02-23 23:39:13 +0100575you would have to do ":!chmod +w %:S" and ":set noro".
Bram Moolenaar071d4272004-06-13 20:20:40 +0000576
577When 'tildeop' has been set, "~" is an operator (must be followed by a
578movement command).
579
580With the "J" (join) command you can reset the 'joinspaces' option to have only
581one space after a period (Vi inserts two spaces).
582
583"cw" can be used to change white space formed by several characters (Vi is
584confusing: "cw" only changes one space, while "dw" deletes all white space).
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200585{Vi: "cw" when on a blank followed by other blanks changes only the first
586blank; this is probably a bug, because "dw" deletes all the blanks}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000587
588"o" and "O" accept a count for repeating the insert (Vi clears a part of
589display).
590
591Flags after Ex commands not supported (no plans to include it).
592
593On non-UNIX systems ":cd" command shows current directory instead of going to
594the home directory (there isn't one). ":pwd" prints the current directory on
595all systems.
596
597After a ":cd" command the file names (in the argument list, opened files)
598still point to the same files. In Vi ":cd" is not allowed in a changed file;
599otherwise the meaning of file names change.
600
601":source!" command reads Vi commands from a file.
602
603":mkexrc" command writes current modified options and mappings to a ".exrc"
604file. ":mkvimrc" writes to a ".vimrc" file.
605
606No check for "tail recursion" with mappings. This allows things like
607":map! foo ^]foo".
608
609When a mapping starts with number, vi loses the count typed before it (e.g.
610when using the mapping ":map g 4G" the command "7g" goes to line 4). This is
611considered a vi bug. Vim concatenates the counts (in the example it becomes
612"74G"), as most people would expect.
613
614The :put! command inserts the contents of a register above the current line.
615
616The "p" and "P" commands of vi cannot be repeated with "." when the putted
617text is less than a line. In Vim they can always be repeated.
618
619":noremap" command can be used to enter a mapping that will not be remapped.
620This is useful to exchange the meaning of two keys. ":cmap", ":cunmap" and
621":cnoremap" can be used for mapping in command-line editing only. ":imap",
622":iunmap" and ":inoremap" can be used for mapping in insert mode only.
623Similar commands exist for abbreviations: ":noreabbrev", ":iabbrev"
624":cabbrev", ":iunabbrev", ":cunabbrev", ":inoreabbrev", ":cnoreabbrev".
625
626In Vi the command ":map foo bar" would remove a previous mapping
627":map bug foo". This is considered a bug, so it is not included in Vim.
628":unmap! foo" does remove ":map! bug foo", because unmapping would be very
629difficult otherwise (this is vi compatible).
630
631The ':' register contains the last command-line.
632The '%' register contains the current file name.
633The '.' register contains the last inserted text.
634
635":dis" command shows the contents of the yank registers.
636
637CTRL-O/CTRL-I can be used to jump to older/newer positions. These are the
638same positions as used with the '' command, but may be in another file. The
639":jumps" command lists the older positions.
640
641If the 'shiftround' option is set, an indent is rounded to a multiple of
642'shiftwidth' with ">" and "<" commands.
643
644The 'scrolljump' option can be set to the minimum number of lines to scroll
645when the cursor gets off the screen. Use this when scrolling is slow.
646
647The 'scrolloff' option can be set to the minimum number of lines to keep
648above and below the cursor. This gives some context to where you are
649editing. When set to a large number the cursor line is always in the middle
650of the window.
651
652Uppercase marks can be used to jump between files. The ":marks" command lists
653all currently set marks. The commands "']" and "`]" jump to the end of the
654previous operator or end of the text inserted with the put command. "'[" and
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200655"`[" do jump to the start. {Vi: no uppercase marks}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000656
657The 'shelltype' option can be set to reflect the type of shell used on the
658Amiga.
659
660The 'highlight' option can be set for the highlight mode to be used for
661several commands.
662
663The CTRL-A (add) and CTRL-X (subtract) commands are new. The count to the
664command (default 1) is added to/subtracted from the number at or after the
665cursor. That number may be decimal, octal (starts with a '0') or hexadecimal
666(starts with '0x'). Very useful in macros.
667
668With the :set command the prefix "inv" can be used to invert boolean options.
669
670In both Vi and Vim you can create a line break with the ":substitute" command
671by using a CTRL-M. For Vi this means you cannot insert a real CTRL-M in the
672text. With Vim you can put a real CTRL-M in the text by preceding it with a
673CTRL-V.
674
675
676In Insert mode:
677
678If the 'revins' option is set, insert happens backwards. This is for typing
679Hebrew. When inserting normal characters the cursor will not be shifted and
680the text moves rightwards. Backspace, CTRL-W and CTRL-U will also work in
681the opposite direction. CTRL-B toggles the 'revins' option. In replace mode
682'revins' has no effect. Only when enabled at compile time.
683
684The backspace key can be used just like CTRL-D to remove auto-indents.
685
686You can backspace, CTRL-U and CTRL-W over line breaks if the 'backspace' (bs)
687option includes "eol". You can backspace over the start of insert if the
688'backspace' option includes "start".
689
Bram Moolenaar9b451252012-08-15 17:43:31 +0200690When the 'paste' option is set, a few options are reset and mapping in insert
Bram Moolenaar071d4272004-06-13 20:20:40 +0000691mode and abbreviation are disabled. This allows for pasting text in windowing
692systems without unexpected results. When the 'paste' option is reset, the old
693option values are restored.
694
695CTRL-T/CTRL-D always insert/delete an indent in the current line, no matter
696what column the cursor is in.
697
698CTRL-@ (insert previously inserted text) works always (Vi: only when typed as
699first character).
700
701CTRL-A works like CTRL-@ but does not leave insert mode.
702
Bram Moolenaar5be4cee2019-09-27 19:34:08 +0200703CTRL-R {register} can be used to insert the contents of a register.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000704
705When the 'smartindent' option is set, C programs will be better auto-indented.
706With 'cindent' even more.
707
708CTRL-Y and CTRL-E can be used to copy a character from above/below the
709current cursor position.
710
711After CTRL-V you can enter a three digit decimal number. This byte value is
712inserted in the text as a single character. Useful for international
713characters that are not on your keyboard.
714
715When the 'expandtab' (et) option is set, a <Tab> is expanded to the
716appropriate number of spaces.
717
718The window always reflects the contents of the buffer (Vi does not do this
719when changing text and in some other cases).
720
721If Vim is compiled with DIGRAPHS defined, digraphs are supported. A set of
722normal digraphs is included. They are shown with the ":digraph" command.
723More can be added with ":digraph {char1}{char2} {number}". A digraph is
724entered with "CTRL-K {char1} {char2}" or "{char1} BS {char2}" (only when
725'digraph' option is set).
726
727When repeating an insert, e.g. "10atest <Esc>" vi would only handle wrapmargin
728for the first insert. Vim does it for all.
729
730A count to the "i" or "a" command is used for all the text. Vi uses the count
731only for one line. "3iabc<NL>def<Esc>" would insert "abcabcabc<NL>def" in Vi
732but "abc<NL>defabc<NL>defabc<NL>def" in Vim.
733
734
735In Command-line mode:
736
Bram Moolenaar4499d2e2005-04-15 20:41:38 +0000737<Esc> terminates the command-line without executing it. In vi the command
Bram Moolenaar071d4272004-06-13 20:20:40 +0000738line would be executed, which is not what most people expect (hitting <Esc>
739should always get you back to command mode). To avoid problems with some
740obscure macros, an <Esc> in a macro will execute the command. If you want a
741typed <Esc> to execute the command like vi does you can fix this with
742 ":cmap ^V<Esc> ^V<CR>"
743
744General:
745
746The 'ttimeout' option is like 'timeout', but only works for cursor and
747function keys, not for ordinary mapped characters. The 'timeoutlen' option
748gives the number of milliseconds that is waited for. If the 'esckeys' option
749is not set, cursor and function keys that start with <Esc> are not recognized
750in insert mode.
751
752There is an option for each terminal string. Can be used when termcap is not
753supported or to change individual strings.
754
755The 'fileformat' option can be set to select the <EOL>: "dos" <CR><NL>, "unix"
756<NL> or "mac" <CR>.
757When the 'fileformats' option is not empty, Vim tries to detect the type of
758<EOL> automatically. The 'fileformat' option is set accordingly.
759
760On systems that have no job control (older Unix systems and non-Unix systems)
761the CTRL-Z, ":stop" or ":suspend" command starts a new shell.
762
763If Vim is started on the Amiga without an interactive window for output, a
764window is opened (and :sh still works). You can give a device to use for
765editing with the |-d| argument, e.g. "-d con:20/20/600/150".
766
767The 'columns' and 'lines' options are used to set or get the width and height
768of the display.
769
770Option settings are read from the first and last few lines of the file.
771Option 'modelines' determines how many lines are tried (default is 5). Note
772that this is different from the Vi versions that can execute any Ex command
773in a modeline (a major security problem). |trojan-horse|
774
775If the 'insertmode' option is set (e.g. in .exrc), Vim starts in insert mode.
776And it comes back there, when pressing <Esc>.
777
778Undo information is kept in memory. Available memory limits the number and
Bram Moolenaar5666fcd2019-12-26 14:35:26 +0100779size of change that can be undone. This is hardly a problem on the Amiga and
780almost never with Unix and Win32.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000781
782If the 'backup' or 'writebackup' option is set: Before a file is overwritten,
783a backup file (.bak) is made. If the "backup" option is set it is left
784behind.
785
786Vim creates a file ending in ".swp" to store parts of the file that have been
787changed or that do not fit in memory. This file can be used to recover from
788an aborted editing session with "vim -r file". Using the swap file can be
789switched off by setting the 'updatecount' option to 0 or starting Vim with
790the "-n" option. Use the 'directory' option for placing the .swp file
791somewhere else.
792
793Vim is able to work correctly on filesystems with 8.3 file names, also when
794using messydos or crossdos filesystems on the Amiga, or any 8.3 mounted
795filesystem under Unix. See |'shortname'|.
796
797Error messages are shown at least one second (Vi overwrites error messages).
798
799If Vim gives the |hit-enter| prompt, you can hit any key. Characters other
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200800than <CR>, <NL> and <Space> are interpreted as the (start of) a command.
801{Vi: only ":" commands are interpreted}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000802
803The contents of the numbered and unnamed registers is remembered when
804changing files.
805
806The "No lines in buffer" message is a normal message instead of an error
807message, since that may cause a mapping to be aborted.
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200808{Vi: error messages may be overwritten with other messages before you have a
809chance to read them}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000810
811The AUX: device of the Amiga is supported.
812
813==============================================================================
Bram Moolenaar6c60f472019-04-28 16:00:35 +02008146. Supported Vi features *vi-features*
815
816Vim supports nearly all Vi commands and mostly in the same way. That is when
817the 'compatible' option is set and 'cpoptions' contains all flags. What the
818effect is of resetting 'compatible' and removing flags from 'cpoptions' can be
819found at the help for the specific command.
820
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200821The help files used to mark features that are in Vim but not in Vi with {not
822in Vi}. However, since these remarks cluttered the help files we now do it
823the other way around: Below is listed what Vi already supported. Anything
824else has been added by Vim.
825
Bram Moolenaar6c60f472019-04-28 16:00:35 +0200826
827The following Ex commands are supported by Vi: ~
828
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200829`:abbreviate` enter abbreviation
830`:append` append text
831`:args` print the argument list
832`:cd` change directory; Vi: no "cd -"
833`:change` replace a line or series of lines
834`:chdir` change directory
835`:copy` copy lines
836`:delete` delete lines
837`:edit` edit a file
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200838`:exit` same as `:xit`
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200839`:file` show or set the current file name; Vi: without the column number
840`:global` execute commands for matching lines
841`:insert` insert text
842`:join` join lines; Vi: not :join!
843`:k` set a mark
844`:list` print lines
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200845`:map` show or enter a mapping
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200846`:mark` set a mark
847`:move` move lines
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200848`:Next` go to previous file in the argument list {Vi: no count}
849`:next` go to next file in the argument list {Vi: no count}
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200850`:number` print lines with line number
851`:open` start open mode (not implemented in Vim)
852`:pop` jump to older entry in tag stack (only in some versions)
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200853`:preserve` write all text to swap file {Vi: might also exit}
854`:previous` same as `:Next` {Vi: only in some versions}
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200855`:print` print lines
856`:put` insert contents of register in the text
857`:quit` quit Vi
858`:read` read file into the text
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200859`:recover` recover a file from a swap file {Vi: recovers in another way
860 and sends mail if there is something to recover}
861`:rewind` go to the first file in the argument list; no ++opt
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200862`:set` set option; but not `:set inv{option}`, `:set option&`,
863 `:set all&`, `:set option+=value`, `:set option^=value`
864 `:set option-=value` `:set option<`
865`:shell` escape to a shell
Bram Moolenaar68e65602019-05-26 21:33:31 +0200866`:source` read Vi or Ex commands from a file
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200867`:stop` suspend the editor or escape to a shell
868`:substitute` find and replace text; Vi: no '&', 'i', 's', 'r' or 'I' flag,
869 confirm prompt only supports 'y' and 'n', no highlighting
870`:suspend` same as ":stop"
871`:t` same as ":copy"
872`:tag` jump to tag
873`:unabbreviate` remove abbreviation
874`:undo` undo last change {Vi: only one level}
875`:unmap` remove mapping
876`:vglobal` execute commands for not matching lines
877`:version` print version number and other info
878`:visual` same as ":edit", but turns off "Ex" mode
879`:wq` write to a file and quit Vi
880`:write` write to a file
881`:xit` write if buffer changed and quit Vi
882`:yank` yank lines into a register
883`:z` print some lines {not in all versions of Vi}
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200884`:!` filter lines or execute an external command
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200885`:"` comment
886`:#` same as ":number"
887`:*` execute contents of a register
888`:&` repeat last ":substitute"
889`:<` shift lines one 'shiftwidth' left
890`:=` print the cursor line number
891`:>` shift lines one 'shiftwidth' right
892`:@` execute contents of a register; but not `:@`; `:@@` only in
893 some versions
Bram Moolenaar6c60f472019-04-28 16:00:35 +0200894
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200895Common for these commands is that Vi doesn't support the ++opt argument on
896`:edit` and other commands that open a file.
897
Bram Moolenaar6c60f472019-04-28 16:00:35 +0200898
899The following Normal mode commands are supported by Vi: ~
900
Bram Moolenaar68e65602019-05-26 21:33:31 +0200901note: See the beginning of |normal-index| for the meaning of WORD, N, Nmove
902and etc in the description text.
903
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200904|CTRL-B| scroll N screens Backwards
905|CTRL-C| interrupt current (search) command
906|CTRL-D| scroll Down N lines (default: half a screen); Vim scrolls
907 'scroll' screen lines, Vi scrolls file lines; makes a
908 difference when lines wrap
909|CTRL-E| scroll N lines upwards (N lines Extra)
910|CTRL-F| scroll N screens Forward
911|CTRL-G| display current file name and position
912|<BS>| same as "h"
913|CTRL-H| same as "h"
914|<NL>| same as "j"
915|CTRL-J| same as "j"
916|CTRL-L| redraw screen
917|<CR>| cursor to the first CHAR N lines lower
918|CTRL-M| same as <CR>
919|CTRL-N| same as "j"
920|CTRL-P| same as "k"
921|CTRL-R| in some Vi versions: same as CTRL-L
922|CTRL-T| jump to N older Tag in tag list
Bram Moolenaar68e65602019-05-26 21:33:31 +0200923|CTRL-U| N lines Upwards (default: half a screen) {Vi used file lines
924 while Vim scrolls 'scroll' screen lines; makes a difference
925 when lines wrap}
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200926|CTRL-Y| scroll N lines downwards
927|CTRL-Z| suspend program (or start new shell)
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200928|CTRL-]| :ta to ident under cursor {Vi: identifier after the cursor}
929|CTRL-^| edit alternate file {Vi: no count}
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200930|<Space>| same as "l"
931|!| filter Nmove text through the {filter} command
932|!!| filter N lines through the {filter} command
933" use register {a-zA-Z0-9.%#:-"} for next delete, yank or put
934 (uppercase to append) ({.%#:} only work with put)
935|$| cursor to the end of Nth next line
936|%| find the next (curly/square) bracket on this line and go to
937 its match, or go to matching comment bracket, or go to
938 matching preprocessor directive (Vi: no count supported)
939|&| repeat last :s
940|'| jump to mark (Vi: only lowercase marks)
941|(| cursor N sentences backward
942|)| cursor N sentences forward
943|+| same as <CR>
944|,| repeat latest f, t, F or T in opposite direction N times
945|-| cursor to the first CHAR N lines higher
946|.| repeat last change with count replaced with N
947|/| search forward for the Nth occurrence of {pattern}
948|0| cursor to the first char of the line
949|:| start entering an Ex command
950|;| repeat latest f, t, F or T N times
951|<| shift Nmove lines one 'shiftwidth' leftwards
952|<<| shift N lines one 'shiftwidth' leftwards
953|=| filter Nmove lines through "indent"
954|==| filter N lines through "indent"
955|>| shift Nmove lines one 'shiftwidth' rightwards
956|>>| shift N lines one 'shiftwidth' rightwards
957|?| search backward for the Nth previous occurrence of {pattern}
958|@| execute the contents of register {a-z} N times
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200959 {Vi: only named registers}
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200960|@@| repeat the previous @{a-z} N times
961|A| append text after the end of the line N times
962|B| cursor N WORDS backward
963|C| change from the cursor position to the end of the line
964|D| delete the characters under the cursor until the end of the
965 line and N-1 more lines [into register x]; synonym for "d$"
966|E| cursor forward to the end of WORD N
967|F| cursor to the Nth occurrence of {char} to the left
968|G| cursor to line N, default last line
969|H| cursor to line N from top of screen
970|I| insert text before the first CHAR on the line N times
971|J| Join N lines; default is 2
972|L| cursor to line N from bottom of screen
973|M| cursor to middle line of screen
974|N| repeat the latest '/' or '?' N times in opposite direction
975|O| begin a new line above the cursor and insert text, repeat N
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200976 times {Vi: blank [count] screen lines}
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200977|P| put the text [from register x] before the cursor N times
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200978 {Vi: no count}
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200979|Q| switch to "Ex" mode
980|R| enter replace mode: overtype existing characters, repeat the
981 entered text N-1 times
982|S| delete N lines [into register x] and start insert; synonym for
983 "cc".
984|T| cursor till after Nth occurrence of {char} to the left
985|U| undo all latest changes on one line
Bram Moolenaara6c27c42019-05-09 19:16:22 +0200986 {Vi: while not moved off of the last modified line}
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200987|W| cursor N WORDS forward
988|X| delete N characters before the cursor [into register x]
989|Y| yank N lines [into register x]; synonym for "yy"
990|ZZ| store current file if modified, and exit
991|[[| cursor N sections backward
992|]]| cursor N sections forward
993|^| cursor to the first CHAR of the line
994|_| cursor to the first CHAR N - 1 lines lower
995|`| cursor to the mark {a-zA-Z0-9}
996|a| append text after the cursor N times
997|b| cursor N words backward
998|c| delete Nmove text [into register x] and start insert
999|cc| delete N lines [into register x] and start insert
1000|d| delete Nmove text [into register x]
1001|dd| delete N lines [into register x]
1002|e| cursor forward to the end of word N
1003|f| cursor to Nth occurrence of {char} to the right
1004|h| cursor N chars to the left
1005|i| insert text before the cursor N times
1006|j| cursor N lines downward
1007|k| cursor N lines upward
1008|l| cursor N chars to the right
1009|m| set mark {A-Za-z} at cursor position
1010|n| repeat the latest '/' or '?' N times
1011|o| begin a new line below the cursor and insert text
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001012 {Vi: blank [count] screen lines}
Bram Moolenaar25c9c682019-05-05 18:13:34 +02001013|p| put the text [from register x] after the cursor N times
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001014 {Vi: no count}
1015|r| replace N chars with {char} {Vi: CTRL-V <CR> still replaces
1016 with a line break, cannot replace something with a <CR>}
Bram Moolenaar25c9c682019-05-05 18:13:34 +02001017|s| (substitute) delete N characters [into register x] and start
1018 insert
1019|t| cursor till before Nth occurrence of {char} to the right
1020|u| undo changes {Vi: only one level}
1021|w| cursor N words forward
1022|x| delete N characters under and after the cursor [into register
1023 x]
1024|y| yank Nmove text [into register x]
1025|yy| yank N lines [into register x]
1026|z<CR>| current line to the top
1027|z-| current line to the bottom
1028|z+| cursor on line N
1029|z^| cursor on line N
1030|{| cursor N paragraphs backward
1031| cursor to column N
1032|}| cursor N paragraphs forward
1033|~| switch case of N characters under the cursor; Vim: depends on
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001034 'tildeop' {Vi: no count, no 'tildeop'}
Bram Moolenaar25c9c682019-05-05 18:13:34 +02001035|<Del>| same as "x"
1036
1037
1038The following commands are supported in Insert mode by Vi: ~
1039
1040CTRL-@ insert previously inserted text and stop insert
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001041 {Vi: only when typed as first char, only up to 128 chars}
Bram Moolenaar25c9c682019-05-05 18:13:34 +02001042CTRL-C quit insert mode, without checking for abbreviation, unless
1043 'insertmode' set.
1044CTRL-D delete one shiftwidth of indent in the current line
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001045 {Vi: CTRL-D works only when used after autoindent}
1046<BS> delete character before the cursor {Vi: does not delete
1047 autoindents, does not cross lines, does not delete past start
1048 position of insert}
Bram Moolenaar25c9c682019-05-05 18:13:34 +02001049CTRL-H same as <BS>
1050<Tab> insert a <Tab> character
1051CTRL-I same as <Tab>
1052<NL> same as <CR>
1053CTRL-J same as <CR>
1054<CR> begin new line
1055CTRL-M same as <CR>
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001056CTRL-T insert one shiftwidth of indent in current line {Vi: only when
1057 in indent}
1058CTRL-V {char} insert next non-digit literally {Vi: no decimal byte entry}
Bram Moolenaar25c9c682019-05-05 18:13:34 +02001059CTRL-W delete word before the cursor
Bram Moolenaar68e65602019-05-26 21:33:31 +02001060CTRL-Z when 'insertmode' set: suspend Vi
Bram Moolenaar25c9c682019-05-05 18:13:34 +02001061<Esc> end insert mode (unless 'insertmode' set)
1062CTRL-[ same as <Esc>
10630 CTRL-D delete all indent in the current line
1064^ CTRL-D delete all indent in the current line, restore it in the next
1065 line
1066<Del> delete character under the cursor
Bram Moolenaar6c60f472019-04-28 16:00:35 +02001067
1068
1069The following options are supported by Vi: ~
1070
1071'autoindent' 'ai' take indent for new line from previous line
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001072 {Vi does this slightly differently: After the
1073 indent is deleted when typing <Esc> or <CR>, the
1074 cursor position when moving up or down is after
1075 the deleted indent; Vi puts the cursor somewhere
1076 in the deleted indent}.
Bram Moolenaar6c60f472019-04-28 16:00:35 +02001077'autowrite' 'aw' automatically write file if changed
1078'directory' 'dir' list of directory names for the swap file
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001079 {Vi: directory to put temp file in, defaults to
1080 "/tmp"}
Bram Moolenaar6c60f472019-04-28 16:00:35 +02001081'edcompatible' 'ed' toggle flags of ":substitute" command
1082'errorbells' 'eb' ring the bell for error messages
1083'ignorecase' 'ic' ignore case in search patterns
1084'lines' number of lines in the display
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001085'lisp' automatic indenting for Lisp {Vi: Does it a little
1086 bit differently}
Bram Moolenaar6c60f472019-04-28 16:00:35 +02001087'list' show <Tab> and <EOL>
1088'magic' changes special characters in search patterns
1089'modeline' 'ml' recognize 'modelines' at start or end of file
1090 {called modelines in some Vi versions}
1091'number' 'nu' print the line number in front of each line
1092'paragraphs' 'para' nroff macros that separate paragraphs
1093'prompt' 'prompt' enable prompt in Ex mode
1094'readonly' 'ro' disallow writing the buffer {Vim sets 'readonly'
1095 when editing a file with `:view`}
1096'remap' allow mappings to work recursively
1097'report' threshold for reporting nr. of lines changed
1098'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D
1099'sections' 'sect' nroff macros that separate sections
1100'shell' 'sh' name of shell to use for external commands
1101'shiftwidth' 'sw' number of spaces to use for (auto)indent step
1102'showmatch' 'sm' briefly jump to matching bracket if insert one
1103'showmode' 'smd' message on status line to show current mode
1104'tabstop' 'ts' number of spaces that <Tab> in file uses
1105'taglength' 'tl' number of significant characters for a tag
1106'tags' 'tag' list of file names used by the tag command
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001107 {Vi: default is "tags /usr/lib/tags"}
Bram Moolenaar6c60f472019-04-28 16:00:35 +02001108'tagstack' 'tgst' push tags onto the tag stack {not in all versions
1109 of Vi}
1110'term' name of the terminal
1111'terse' shorten some messages
1112'timeout' 'to' time out on mappings and key codes
Bram Moolenaar25c9c682019-05-05 18:13:34 +02001113'timeoutlen' 'tm' time for 'timeout' {only in some Vi versions}
Bram Moolenaar6c60f472019-04-28 16:00:35 +02001114'ttytype' 'tty' alias for 'term'
1115'verbose' 'vbs' give informative messages {only in some Vi
1116 versions as a boolean option}
1117'warn' warn for shell command when buffer was changed
1118'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B
Bram Moolenaar25c9c682019-05-05 18:13:34 +02001119 {Vi also uses the option to specify the number of
1120 displayed lines}
Bram Moolenaar6c60f472019-04-28 16:00:35 +02001121'wrapmargin' 'wm' chars from the right where wrapping starts
Bram Moolenaara6c27c42019-05-09 19:16:22 +02001122 {Vi: works differently and less usefully}
Bram Moolenaar6c60f472019-04-28 16:00:35 +02001123'wrapscan' 'ws' searches wrap around the end of the file
1124'writeany' 'wa' write to file with no need for "!" override
1125
1126Also see |missing-options|.
1127
1128==============================================================================
11297. Command-line arguments *cmdline-arguments*
Bram Moolenaar071d4272004-06-13 20:20:40 +00001130
1131Different versions of Vi have different command-line arguments. This can be
1132confusing. To help you, this section gives an overview of the differences.
1133
1134Five variants of Vi will be considered here:
1135 Elvis Elvis version 2.1b
1136 Nvi Nvi version 1.79
1137 Posix Posix 1003.2
1138 Vi Vi version 3.7 (for Sun 4.1.x)
1139 Vile Vile version 7.4 (incomplete)
1140 Vim Vim version 5.2
1141
1142Only Vim is able to accept options in between and after the file names.
1143
1144+{command} Elvis, Nvi, Posix, Vi, Vim: Same as "-c {command}".
1145
1146- Nvi, Posix, Vi: Run Ex in batch mode.
1147 Vim: Read file from stdin (use -s for batch mode).
1148
1149-- Vim: End of options, only file names are following.
1150
1151--cmd {command} Vim: execute {command} before sourcing vimrc files.
1152
1153--echo-wid Vim: GTK+ echoes the Window ID on stdout
1154
1155--help Vim: show help message and exit.
1156
1157--literal Vim: take file names literally, don't expand wildcards.
1158
1159--nofork Vim: same as |-f|
1160
1161--noplugin[s] Vim: Skip loading plugins.
1162
1163--remote Vim: edit the files in another Vim server
1164
1165--remote-expr {expr} Vim: evaluate {expr} in another Vim server
1166
1167--remote-send {keys} Vim: send {keys} to a Vim server and exit
1168
1169--remote-silent {file} Vim: edit the files in another Vim server if possible
1170
1171--remote-wait Vim: edit the files in another Vim server and wait for it
1172
1173--remote-wait-silent Vim: like --remote-wait, no complaints if not possible
1174
1175--role {role} Vim: GTK+ 2: set role of main window
1176
1177--serverlist Vim: Output a list of Vim servers and exit
1178
1179--servername {name} Vim: Specify Vim server name
1180
1181--socketid {id} Vim: GTK window socket to run Vim in
1182
Bram Moolenaar78e17622007-08-30 10:26:19 +00001183--windowid {id} Vim: Win32 window ID to run Vim in
1184
Bram Moolenaar071d4272004-06-13 20:20:40 +00001185--version Vim: show version message and exit.
1186
1187-? Vile: print usage summary and exit.
1188
1189-a Elvis: Load all specified file names into a window (use -o for
1190 Vim).
1191
1192-A Vim: Start in Arabic mode (when compiled with Arabic).
1193
1194-b {blksize} Elvis: Use {blksize} blocksize for the session file.
1195-b Vim: set 'binary' mode.
1196
1197-C Vim: Compatible mode.
1198
1199-c {command} Elvis, Nvi, Posix, Vim: run {command} as an Ex command after
1200 loading the edit buffer.
1201 Vim: allow up to 10 "-c" arguments
1202
1203-d {device} Vim: Use {device} for I/O (Amiga only). {only when compiled
1204 without the |+diff| feature}
1205-d Vim: start with 'diff' set. |vimdiff|
1206
1207-dev {device} Vim: Use {device} for I/O (Amiga only).
1208
1209-D Vim: debug mode.
1210
1211-e Elvis, Nvi, Vim: Start in Ex mode, as if the executable is
1212 called "ex".
1213
1214-E Vim: Start in improved Ex mode |gQ|, like "exim".
1215
1216-f Vim: Run GUI in foreground (Amiga: don't open new window).
1217-f {session} Elvis: Use {session} as the session file.
1218
1219-F Vim: Start in Farsi mode (when compiled with Farsi).
1220 Nvi: Fast start, don't read the entire file when editing
1221 starts.
1222
1223-G {gui} Elvis: Use the {gui} as user interface.
1224
1225-g Vim: Start GUI.
1226-g N Vile: start editing at line N
1227
1228-h Vim: Give help message.
1229 Vile: edit the help file
1230
1231-H Vim: start Hebrew mode (when compiled with it).
1232
1233-i Elvis: Start each window in Insert mode.
1234-i {viminfo} Vim: Use {viminfo} for viminfo file.
1235
Bram Moolenaar25c9c682019-05-05 18:13:34 +02001236-L Vim: Same as "-r" {only in some versions of Vi: "List
1237 recoverable edit sessions"}.
Bram Moolenaar071d4272004-06-13 20:20:40 +00001238
1239-l Nvi, Vi, Vim: Set 'lisp' and 'showmatch' options.
1240
1241-m Vim: Modifications not allowed to be written, resets 'write'
1242 option.
1243
1244-M Vim: Modifications not allowed, resets 'modifiable' and the
1245 'write' option.
1246
1247-N Vim: No-compatible mode.
1248
1249-n Vim: No swap file used.
1250
1251-nb[args] Vim: open a NetBeans interface connection
1252
1253-O[N] Vim: Like -o, but use vertically split windows.
1254
1255-o[N] Vim: Open [N] windows, or one for each file.
1256
Bram Moolenaar18144c82006-04-12 21:52:12 +00001257-p[N] Vim: Open [N] tab pages, or one for each file.
1258
Bram Moolenaar071d4272004-06-13 20:20:40 +00001259-P {parent-title} Win32 Vim: open Vim inside a parent application window
1260
1261-q {name} Vim: Use {name} for quickfix error file.
1262-q{name} Vim: Idem.
1263
1264-R Elvis, Nvi, Posix, Vile, Vim: Set the 'readonly' option.
1265
1266-r Elvis, Nvi, Posix, Vi, Vim: Recovery mode.
1267
1268-S Nvi: Set 'secure' option.
1269-S {script} Vim: source script after starting up.
1270
1271-s Nvi, Posix, Vim: Same as "-" (silent mode), when in Ex mode.
1272 Elvis: Sets the 'safer' option.
1273-s {scriptin} Vim: Read from script file {scriptin}; only when not in Ex
1274 mode.
1275-s {pattern} Vile: search for {pattern}
1276
1277-t {tag} Elvis, Nvi, Posix, Vi, Vim: Edit the file containing {tag}.
1278-t{tag} Vim: Idem.
1279
1280-T {term} Vim: Set terminal name to {term}.
1281
1282-u {vimrc} Vim: Read initializations from {vimrc} file.
1283
1284-U {gvimrc} Vim: Read GUI initializations from {gvimrc} file.
1285
1286-v Nvi, Posix, Vi, Vim: Begin in Normal mode (visual mode, in Vi
1287 terms).
1288 Vile: View mode, no changes possible.
1289
1290-V Elvis, Vim: Verbose mode.
1291-V{nr} Vim: Verbose mode with specified level.
1292
1293-w {size} Elvis, Posix, Nvi, Vi, Vim: Set value of 'window' to {size}.
1294-w{size} Nvi, Vi: Same as "-w {size}".
1295-w {name} Vim: Write to script file {name} (must start with non-digit).
1296
1297-W {name} Vim: Append to script file {name}.
1298
1299-x Vi, Vim: Ask for encryption key. See |encryption|.
1300
1301-X Vim: Don't connect to the X server.
1302
1303-y Vim: Start in easy mode, like |evim|.
1304
1305-Z Vim: restricted mode
1306
1307@{cmdfile} Vile: use {cmdfile} as startup file.
1308
Bram Moolenaarf97ca8f2005-02-07 21:49:25 +00001309==============================================================================
Bram Moolenaar6c60f472019-04-28 16:00:35 +020013108. POSIX compliance *posix* *posix-compliance*
Bram Moolenaarf97ca8f2005-02-07 21:49:25 +00001311
Bram Moolenaardd2a3cd2007-05-05 17:10:09 +00001312In 2005 the POSIX test suite was run to check the compatibility of Vim. Most
Bram Moolenaar4399ef42005-02-12 14:29:27 +00001313of the test was executed properly. There are the few things where Vim
Bram Moolenaar6bdcfc02005-02-22 08:28:13 +00001314is not POSIX compliant, even when run in Vi compatibility mode.
Bram Moolenaar38a55632016-02-15 22:07:32 +01001315 *$VIM_POSIX*
Bram Moolenaar4399ef42005-02-12 14:29:27 +00001316Set the $VIM_POSIX environment variable to have 'cpoptions' include the POSIX
1317flags when Vim starts up. This makes Vim run as POSIX as it can. That's
Bram Moolenaar6bdcfc02005-02-22 08:28:13 +00001318a bit different from being Vi compatible.
Bram Moolenaar4399ef42005-02-12 14:29:27 +00001319
Bram Moolenaar574ee7b2019-11-13 23:04:29 +01001320You can find the Posix specification for Vi here:
1321https://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html
1322And the related Ex specification:
1323https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html
1324
Bram Moolenaar4399ef42005-02-12 14:29:27 +00001325This is where Vim does not behave as POSIX specifies and why:
1326
Bram Moolenaarf97ca8f2005-02-07 21:49:25 +00001327 *posix-screen-size*
Bram Moolenaar4399ef42005-02-12 14:29:27 +00001328 The $COLUMNS and $LINES environment variables are ignored by Vim if
1329 the size can be obtained from the terminal in a more reliable way.
1330 Add the '|' flag to 'cpoptions' to have $COLUMNS and $LINES overrule
1331 sizes obtained in another way.
Bram Moolenaarf97ca8f2005-02-07 21:49:25 +00001332
Bram Moolenaar4399ef42005-02-12 14:29:27 +00001333 The "{" and "}" commands don't stop at a "{" in the original Vi, but
1334 POSIX specifies it does. Add the '{' flag to 'cpoptions' if you want
1335 it the POSIX way.
1336
1337 The "D", "o" and "O" commands accept a count. Also when repeated.
1338 Add the '#' flag to 'cpoptions' if you want to ignore the count.
Bram Moolenaarf97ca8f2005-02-07 21:49:25 +00001339
Bram Moolenaar6bdcfc02005-02-22 08:28:13 +00001340 The ":cd" command fails if the current buffer is modified when the '.'
1341 flag is present in 'cpoptions'.
1342
1343 There is no ATTENTION message, the "A" flag is added to 'shortmess'.
1344
1345These are remarks about running the POSIX test suite:
1346- vi test 33 sometimes fails for unknown reasons
1347- vi test 250 fails; behavior will be changed in a new revision
1348 http://www.opengroup.org/austin/mailarchives/ag-review/msg01710.html
Bram Moolenaar483c5d82010-10-20 18:45:33 +02001349 (link no longer works, perhaps it's now:
1350 https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-review-l&id=1711)
Bram Moolenaar6bdcfc02005-02-22 08:28:13 +00001351- vi test 310 fails; exit code non-zero when any error occurred?
1352- ex test 24 fails because test is wrong. Changed between SUSv2 and SUSv3.
1353- ex tests 47, 48, 49, 72, 73 fail because .exrc file isn't read in silent
1354 mode and $EXINIT isn't used.
1355- ex tests 76, 78 fail because echo is used instead of printf. (fixed)
1356 Also: problem with \s not changed to space.
1357- ex test 355 fails because 'window' isn't used for "30z".
1358- ex test 368 fails because shell command isn't echoed in silent mode.
1359- ex test 394 fails because "=" command output isn't visible in silent mode.
1360- ex test 411 fails because test file is wrong, contains stray ':'.
1361- ex test 475 and 476 fail because reprint output isn't visible in silent mode.
1362- ex test 480 and 481 fail because the tags file has spaces instead of a tab.
1363- ex test 502 fails because .exrc isn't read in silent mode.
1364- ex test 509 fails because .exrc isn't read in silent mode. and exit code is
1365 1 instead of 2.
1366- ex test 534 fails because .exrc isn't read in silent mode.
1367
Christian Brabandt18defab2024-11-10 20:10:42 +01001368==============================================================================
13699. Supported Operating systems *os-support*
1370
1371Vim tries to support some old operating systems, however support for older
1372operating systems might be dropped if maintenance becomes a burden or can no
1373longer be verified.
1374
1375Here is the status of some operating systems. Note fully supported means,
1376support is verified as part of the CI test suite.
1377
1378System | Status:~
1379--------------------------------+-----------------------------------------
1380Amiga (OS4, AROS & MorphOS): | still supported (?)
1381Haiku: | still supported (?)
1382Linux: | fully supported (on maintained versions)
1383Mac OS: | fully supported up until v10.6 (?)
1384MS-Windows 7, 8, 10, 11: | fully supported
1385UNIX: | supported (on maintained versions)
1386OpenVMS: | supported
1387QNX: | still supported (?)
1388zOS/OS390: | still supported (?)
1389
1390The following operating systems are no longer supported:
1391
1392System | Status:~
1393--------------------------------+-----------------------------------------
1394Atari MiNT | support was dropped with v8.2.1215
1395BeOS: | support was dropped with v8.2.0849
1396MS-DOS: | support was dropped with v7.4.1399
1397MS-Windows XP and Vista: | support was dropped with v9.0.0496
1398OS/2 | support was dropped with v7.4.1008
1399RISC OS: | support was dropped with v7.3.0187
Bram Moolenaarf97ca8f2005-02-07 21:49:25 +00001400
Bram Moolenaard473c8c2018-08-11 18:00:22 +02001401 vim:tw=78:ts=8:noet:ft=help:norl: