Mercurial > vim
annotate runtime/doc/vi_diff.txt @ 18510:b832fc67f84d v8.1.2249
patch 8.1.2249: "make vimtags" does not print any message
Commit: https://github.com/vim/vim/commit/d047840ce4b770a86bacab0d62e72d0f61a2b8ab
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 3 21:46:19 2019 +0100
patch 8.1.2249: "make vimtags" does not print any message
Problem: "make vimtags" does not print any message.
Solution: Add a message that the tags have been updated.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 03 Nov 2019 22:00:03 +0100 |
parents | 375a7ecdb351 |
children | c4cdc715cb68 |
rev | line source |
---|---|
18343 | 1 *vi_diff.txt* For Vim version 8.1. Last change: 2019 Oct 12 |
7 | 2 |
3 | |
4 VIM REFERENCE MANUAL by Bram Moolenaar | |
5 | |
6 | |
7 Differences between Vim and Vi *vi-differences* | |
8 | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
9 This file lists the differences between Vim and Vi/Ex and gives an overview of |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
10 what is in Vim that is not in Vi. |
7 | 11 |
12 Vim is mostly POSIX 1003.2-1 compliant. The only command known to be missing | |
13 is ":open". There are probably a lot of small differences (either because Vim | |
14 is missing something or because Posix is beside the mark). | |
15 | |
166 | 16 1. Simulated command |simulated-command| |
7 | 17 2. Missing options |missing-options| |
18 3. Limits |limits| | |
19 4. The most interesting additions |vim-additions| | |
20 5. Other vim features |other-features| | |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
21 6. Supported Vi features |vi-features| |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
22 7. Command-line arguments |cmdline-arguments| |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
23 8. POSIX compliance |posix-compliance| |
7 | 24 |
25 ============================================================================== | |
166 | 26 1. Simulated command *simulated-command* |
27 | |
1118 | 28 This command is in Vi, but Vim only simulates it: |
166 | 29 |
30 *:o* *:op* *:open* | |
31 :[range]o[pen] Works like |:visual|: end Ex mode. | |
32 {Vi: start editing in open mode} | |
7 | 33 |
166 | 34 :[range]o[pen] /pattern/ As above, additionally move the cursor to the |
35 column where "pattern" matches in the cursor | |
36 line. | |
7 | 37 |
166 | 38 Vim does not support open mode, since it's not really useful. For those |
39 situations where ":open" would start open mode Vim will leave Ex mode, which | |
40 allows executing the same commands, but updates the whole screen instead of | |
41 only one line. | |
7 | 42 |
43 ============================================================================== | |
44 2. Missing options *missing-options* | |
45 | |
46 These options are in the Unix Vi, but not in Vim. If you try to set one of | |
47 them you won't get an error message, but the value is not used and cannot be | |
48 printed. | |
49 | |
50 autoprint (ap) boolean (default on) *'autoprint'* *'ap'* | |
51 beautify (bf) boolean (default off) *'beautify'* *'bf'* | |
52 flash (fl) boolean (default ??) *'flash'* *'fl'* | |
53 graphic (gr) boolean (default off) *'graphic'* *'gr'* | |
54 hardtabs (ht) number (default 8) *'hardtabs'* *'ht'* | |
55 number of spaces that a <Tab> moves on the display | |
56 mesg boolean (default on) *'mesg'* | |
57 novice boolean (default off) *'novice'* | |
58 open boolean (default on) *'open'* | |
59 optimize (op) boolean (default off) *'optimize'* *'op'* | |
60 redraw boolean (default off) *'redraw'* | |
61 slowopen (slow) boolean (default off) *'slowopen'* *'slow'* | |
62 sourceany boolean (default off) *'sourceany'* | |
63 w300 number (default 23) *'w300'* | |
64 w1200 number (default 23) *'w1200'* | |
65 w9600 number (default 23) *'w9600'* | |
66 | |
18343 | 67 Vi did not allow for changing the termcap entries, you would have to exit Vi, |
68 edit the termcap entry and try again. Vim has the |terminal-options|. | |
69 | |
7 | 70 ============================================================================== |
71 3. Limits *limits* | |
72 | |
73 Vim has only a few limits for the files that can be edited {Vi: can not handle | |
74 <Nul> characters and characters above 128, has limited line length, many other | |
75 limits}. | |
76 *E340* | |
77 Maximum line length On machines with 16-bit ints (Amiga and MS-DOS real | |
78 mode): 32767, otherwise 2147483647 characters. | |
79 Longer lines are split. | |
80 Maximum number of lines 2147483647 lines. | |
81 Maximum file size 2147483647 bytes (2 Gbyte) when a long integer is | |
82 32 bits. Much more for 64 bit longs. Also limited | |
83 by available disk space for the |swap-file|. | |
84 *E75* | |
85 Length of a file path Unix and Win32: 1024 characters, otherwise 256 | |
86 characters (or as much as the system supports). | |
87 Length of an expanded string option | |
88 Unix and Win32: 1024 characters, otherwise 256 | |
89 characters | |
90 Maximum display width Unix and Win32: 1024 characters, otherwise 255 | |
91 characters | |
92 Maximum lhs of a mapping 50 characters. | |
625 | 93 Number of different highlighting types: over 30000 |
3082 | 94 Range of a Number variable: -2147483648 to 2147483647 (might be more on 64 |
95 bit systems) | |
2596 | 96 Maximum length of a line in a tags file: 512 bytes. |
7 | 97 |
98 Information for undo and text in registers is kept in memory, thus when making | |
99 (big) changes the amount of (virtual) memory available limits the number of | |
100 undo levels and the text that can be kept in registers. Other things are also | |
101 kept in memory: Command-line history, error messages for Quickfix mode, etc. | |
102 | |
103 Memory usage limits | |
104 ------------------- | |
105 | |
106 The option 'maxmem' ('mm') is used to set the maximum memory used for one | |
107 buffer (in kilobytes). 'maxmemtot' is used to set the maximum memory used for | |
108 all buffers (in kilobytes). The defaults depend on the system used. For the | |
109 Amiga and MS-DOS, 'maxmemtot' is set depending on the amount of memory | |
827 | 110 available. |
111 These are not hard limits, but tell Vim when to move text into a swap file. | |
112 If you don't like Vim to swap to a file, set 'maxmem' and 'maxmemtot' to a | |
113 very large value. The swap file will then only be used for recovery. If you | |
114 don't want a swap file at all, set 'updatecount' to 0, or use the "-n" | |
115 argument when starting Vim. | |
7 | 116 |
117 ============================================================================== | |
118 4. The most interesting additions *vim-additions* | |
119 | |
120 Vi compatibility. |'compatible'| | |
121 Although Vim is 99% Vi compatible, some things in Vi can be | |
122 considered to be a bug, or at least need improvement. But still, Vim | |
123 starts in a mode which behaves like the "real" Vi as much as possible. | |
124 To make Vim behave a little bit better, try resetting the 'compatible' | |
125 option: | |
126 :set nocompatible | |
127 Or start Vim with the "-N" argument: | |
128 vim -N | |
827 | 129 Vim starts with 'nocompatible' automatically if you have a .vimrc |
130 file. See |startup|. | |
7 | 131 The 'cpoptions' option can be used to set Vi compatibility on/off for |
132 a number of specific items. | |
133 | |
134 Support for different systems. | |
135 Vim can be used on: | |
136 - All Unix systems (it works on all systems it was tested on, although | |
137 the GUI and Perl interface may not work everywhere). | |
138 - Amiga (500, 1000, 1200, 2000, 3000, 4000, ...). | |
139 - MS-DOS in real-mode (no additional drivers required). | |
140 - In protected mode on Windows 3.1 and MS-DOS (DPMI driver required). | |
141 - Windows 95 and Windows NT, with support for long file names. | |
142 - OS/2 (needs emx.dll) | |
143 - Atari MiNT | |
144 - VMS | |
145 - BeOS | |
146 - Macintosh | |
147 - Risc OS | |
148 - IBM OS/390 | |
827 | 149 Note that on some systems features need to be disabled to reduce |
150 resource usage, esp. on MS-DOS. For some outdated systems you need to | |
151 use an older Vim version. | |
7 | 152 |
9887
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
153 Multi level persistent undo. |undo| |
7 | 154 'u' goes backward in time, 'CTRL-R' goes forward again. Set option |
155 'undolevels' to the number of changes to be remembered (default 1000). | |
5340 | 156 Set 'undolevels' to 0 for a Vi-compatible one level undo. Set it to |
7 | 157 -1 for no undo at all. |
158 When all changes in a buffer have been undone, the buffer is not | |
159 considered changed anymore. You can exit it with :q, without <!>. | |
827 | 160 When undoing a few changes and then making a new change Vim will |
161 create a branch in the undo tree. This means you can go back to any | |
1186 | 162 state of the text, there is no risk of a change causing text to be |
827 | 163 lost forever. |undo-tree| |
9887
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
164 The undo information is stored in a file when the 'undofile' option is |
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
165 set. This means you can exit Vim, start Vim on a previously edited |
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
166 file and undo changes that were made before exiting Vim. |
7 | 167 |
827 | 168 Graphical User Interface (GUI). |gui| |
7 | 169 Included support for GUI: menu's, mouse, scrollbars, etc. You can |
170 define your own menus. Better support for CTRL/SHIFT/ALT keys in | |
171 combination with special keys and mouse. Supported for various | |
172 platforms, such as X11 (with Motif and Athena interfaces), GTK, Win32 | |
173 (Windows 95 and later), BeOS, Amiga and Macintosh. | |
174 | |
175 Multiple windows and buffers. |windows.txt| | |
176 Vim can split the screen into several windows, each editing a | |
177 different buffer or the same buffer at a different location. Buffers | |
178 can still be loaded (and changed) but not displayed in a window. This | |
179 is called a hidden buffer. Many commands and options have been added | |
180 for this facility. | |
827 | 181 Vim can also use multiple tab pages, each with one or more windows. A |
182 line with tab labels can be used to quickly switch between these pages. | |
183 |tab-page| | |
7 | 184 |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
185 Terminal window. |:terminal| |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
186 Vim can create a window in which a terminal emulator runs. This can |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
187 be used to execute an arbitrary command, a shell or a debugger. |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
188 |
7 | 189 Syntax highlighting. |:syntax| |
190 Vim can highlight keywords, patterns and other things. This is | |
827 | 191 defined by a number of |:syntax| commands, and can be made to |
7 | 192 highlight most languages and file types. A number of files are |
193 included for highlighting the most common languages, like C, C++, | |
194 Java, Pascal, Makefiles, shell scripts, etc. The colors used for | |
195 highlighting can be defined for ordinary terminals, color terminals | |
827 | 196 and the GUI with the |:highlight| command. A convenient way to do |
197 this is using a |:colorscheme| command. | |
198 The highlighted text can be exported as HTML. |convert-to-HTML| | |
199 Other items that can be highlighted are matches with the search string | |
200 |'hlsearch'|, matching parens |matchparen| and the cursor line and | |
201 column |'cursorline'| |'cursorcolumn'|. | |
7 | 202 |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
203 Text properties |textprop.txt| |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
204 Vim supports highlighting text by a plugin. Property types can be |
16808 | 205 specified with |prop_type_add()| and properties can be placed with |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
206 |prop_add()|. |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
207 |
827 | 208 Spell checking. |spell| |
209 When the 'spell' option is set Vim will highlight spelling mistakes. | |
3750 | 210 About 50 languages are currently supported, selected with the |
1618 | 211 'spelllang' option. In source code only comments and strings are |
827 | 212 checked for spelling. |
213 | |
214 Folding. |folding| | |
7 | 215 A range of lines can be shown as one "folded" line. This allows |
216 overviewing a file and moving blocks of text around quickly. | |
217 Folds can be created manually, from the syntax of the file, by indent, | |
218 etc. | |
219 | |
827 | 220 Diff mode. |diff| |
221 Vim can show two versions of a file with the differences highlighted. | |
222 Parts of the text that are equal are folded away. Commands can be | |
223 used to move text from one version to the other. | |
224 | |
225 Plugins. |add-plugin| | |
7 | 226 The functionality can be extended by dropping a plugin file in the |
227 right directory. That's an easy way to start using Vim scripts | |
228 written by others. Plugins can be for all kind of files, or | |
229 specifically for a filetype. | |
9887
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
230 Packages make this even easier. |packages| |
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
231 |
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
232 Asynchronous communication and timers. |channel| |job| |timer| |
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
233 Vim can exchange messages with other processes in the background. |
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
234 This makes it possible to have servers do work and send back the |
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
235 results to Vim. |channel| |
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
236 Vim can start a job, communicate with it and stop it. |job| |
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
237 Timers can fire once or repeatedly and invoke a function to do any |
b4da19b7539f
commit https://github.com/vim/vim/commit/dc1f1645cb495fa6bfbe216d7359f23539a0e25d
Christian Brabandt <cb@256bit.org>
parents:
8061
diff
changeset
|
238 work. |timer| |
7 | 239 |
240 Repeat a series of commands. |q| | |
827 | 241 "q{c}" starts recording typed characters into named register {c}. |
242 A subsequent "q" stops recording. The register can then be executed | |
243 with the "@{c}" command. This is very useful to repeat a complex | |
244 action. | |
7 | 245 |
246 Flexible insert mode. |ins-special-special| | |
247 The arrow keys can be used in insert mode to move around in the file. | |
248 This breaks the insert in two parts as far as undo and redo is | |
249 concerned. | |
250 | |
827 | 251 CTRL-O can be used to execute a single Normal mode command. This is |
252 almost the same as hitting <Esc>, typing the command and doing |a|. | |
7 | 253 |
254 Visual mode. |Visual-mode| | |
827 | 255 Visual mode can be used to first highlight a piece of text and then |
256 give a command to do something with it. This is an (easy to use) | |
257 alternative to first giving the operator and then moving to the end of | |
258 the text to be operated upon. | |
259 |v| and |V| are used to start Visual mode. |v| works on characters | |
260 and |V| on lines. Move the cursor to extend the Visual area. It is | |
261 shown highlighted on the screen. By typing "o" the other end of the | |
262 Visual area can be moved. The Visual area can be affected by an | |
263 operator: | |
7 | 264 d delete |
265 c change | |
266 y yank | |
267 > or < insert or delete indent | |
268 ! filter through external program | |
269 = filter through indent | |
827 | 270 : start |:| command for the Visual lines. |
7 | 271 gq format text to 'textwidth' columns |
272 J join lines | |
273 ~ swap case | |
274 u make lowercase | |
275 U make uppercase | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
276 {Vi has no Visual mode, the name "visual" is used for Normal mode, to |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
277 distinguish it from Ex mode} |
7 | 278 |
279 Block operators. |visual-block| | |
827 | 280 With Visual mode a rectangular block of text can be selected. Start |
281 Visual mode with CTRL-V. The block can be deleted ("d"), yanked ("y") | |
282 or its case can be changed ("~", "u" and "U"). A deleted or yanked | |
283 block can be put into the text with the "p" and "P" commands. | |
7 | 284 |
827 | 285 Help system. |:help| |
7 | 286 Help is displayed in a window. The usual commands can be used to |
287 move around, search for a string, etc. Tags can be used to jump | |
827 | 288 around in the help files, just like hypertext links. The |:help| |
7 | 289 command takes an argument to quickly jump to the info on a subject. |
290 <F1> is the quick access to the help system. The name of the help | |
291 index file can be set with the 'helpfile' option. | |
292 | |
293 Command-line editing and history. |cmdline-editing| | |
294 You can insert or delete at any place in the command-line using the | |
295 cursor keys. The right/left cursor keys can be used to move | |
296 forward/backward one character. The shifted right/left cursor keys | |
297 can be used to move forward/backward one word. CTRL-B/CTRL-E can be | |
298 used to go to the begin/end of the command-line. | |
16610 | 299 {Vi: can only alter the last character in the line} |
300 {Vi: when hitting <Esc> the command-line is executed. This is | |
301 unexpected for most people; therefore it was changed in Vim. But when | |
302 the <Esc> is part of a mapping, the command-line is executed. If you | |
303 want the Vi behaviour also when typing <Esc>, use ":cmap ^V<Esc> | |
304 ^V^M"} | |
7 | 305 |cmdline-history| |
306 The command-lines are remembered. The up/down cursor keys can be used | |
307 to recall previous command-lines. The 'history' option can be set to | |
308 the number of lines that will be remembered. There is a separate | |
309 history for commands and for search patterns. | |
310 | |
311 Command-line completion. |cmdline-completion| | |
312 While entering a command-line (on the bottom line of the screen) | |
313 <Tab> can be typed to complete | |
314 what example ~ | |
315 - command :e<Tab> | |
316 - tag :ta scr<Tab> | |
317 - option :set sc<Tab> | |
318 - option value :set hf=<Tab> | |
319 - file name :e ve<Tab> | |
320 - etc. | |
321 | |
322 If there are multiple matches, CTRL-N (next) and CTRL-P (previous) | |
323 will walk through the matches. <Tab> works like CTRL-N, but wraps | |
324 around to the first match. | |
325 | |
326 The 'wildchar' option can be set to the character for command-line | |
327 completion, <Tab> is the default. CTRL-D can be typed after an | |
328 (incomplete) wildcard; all matches will be listed. CTRL-A will insert | |
329 all matches. CTRL-L will insert the longest common part of the | |
330 matches. | |
331 | |
827 | 332 Insert-mode completion. |ins-completion| |
333 In Insert mode the CTRL-N and CTRL-P keys can be used to complete a | |
334 word that appears elsewhere. |i_CTRL-N| | |
7 | 335 With CTRL-X another mode is entered, through which completion can be |
336 done for: | |
337 |i_CTRL-X_CTRL-F| file names | |
338 |i_CTRL-X_CTRL-K| words from 'dictionary' files | |
339 |i_CTRL-X_CTRL-T| words from 'thesaurus' files | |
340 |i_CTRL-X_CTRL-I| words from included files | |
341 |i_CTRL-X_CTRL-L| whole lines | |
342 |i_CTRL-X_CTRL-]| words from the tags file | |
343 |i_CTRL-X_CTRL-D| definitions or macros | |
827 | 344 |i_CTRL-X_CTRL-O| Omni completion: clever completion |
345 specifically for a file type | |
346 etc. | |
7 | 347 |
827 | 348 Long line support. |'wrap'| |'linebreak'| |
7 | 349 If the 'wrap' option is off, long lines will not wrap and only part |
350 of them will be shown. When the cursor is moved to a part that is not | |
351 shown, the screen will scroll horizontally. The minimum number of | |
827 | 352 columns to scroll can be set with the 'sidescroll' option. The |zh| |
353 and |zl| commands can be used to scroll sideways. | |
7 | 354 Alternatively, long lines are broken in between words when the |
355 'linebreak' option is set. This allows editing a single-line | |
356 paragraph conveniently (e.g. when the text is later read into a DTP | |
827 | 357 program). Move the cursor up/down with the |gk| and |gj| commands. |
7 | 358 |
359 Text formatting. |formatting| | |
360 The 'textwidth' option can be used to automatically limit the line | |
361 length. This supplements the 'wrapmargin' option of Vi, which was not | |
827 | 362 very useful. The |gq| operator can be used to format a piece of text |
363 (for example, |gqap| formats the current paragraph). Commands for | |
364 text alignment: |:center|, |:left| and |:right|. | |
7 | 365 |
827 | 366 Extended search patterns. |pattern| |
7 | 367 There are many extra items to match various text items. Examples: |
368 A "\n" can be used in a search pattern to match a line break. | |
369 "x\{2,4}" matches "x" 2 to 4 times. | |
370 "\s" matches a white space character. | |
371 | |
827 | 372 Directory, remote and archive browsing. |netrw| |
373 Vim can browse the file system. Simply edit a directory. Move around | |
374 in the list with the usual commands and press <Enter> to go to the | |
375 directory or file under the cursor. | |
376 This also works for remote files over ftp, http, ssh, etc. | |
377 Zip and tar archives can also be browsed. |tar| |zip| | |
378 | |
7 | 379 Edit-compile-edit speedup. |quickfix| |
827 | 380 The |:make| command can be used to run the compilation and jump to the |
381 first error. A file with compiler error messages is interpreted. Vim | |
382 jumps to the first error. | |
7 | 383 |
384 Each line in the error file is scanned for the name of a file, line | |
385 number and error message. The 'errorformat' option can be set to a | |
386 list of scanf-like strings to handle output from many compilers. | |
387 | |
827 | 388 The |:cn| command can be used to jump to the next error. |
389 |:cl| lists all the error messages. Other commands are available. | |
7 | 390 The 'makeef' option has the name of the file with error messages. |
391 The 'makeprg' option contains the name of the program to be executed | |
827 | 392 with the |:make| command. |
7 | 393 The 'shellpipe' option contains the string to be used to put the |
394 output of the compiler into the errorfile. | |
395 | |
827 | 396 Finding matches in files. |:vimgrep| |
397 Vim can search for a pattern in multiple files. This uses the | |
398 advanced Vim regexp pattern, works on all systems and also works to | |
399 search in compressed files. | |
400 | |
401 Improved indenting for programs. |'cindent'| | |
7 | 402 When the 'cindent' option is on the indent of each line is |
403 automatically adjusted. C syntax is mostly recognized. The indent | |
404 for various styles can be set with 'cinoptions'. The keys to trigger | |
405 indenting can be set with 'cinkeys'. | |
406 | |
407 Comments can be automatically formatted. The 'comments' option can be | |
408 set to the characters that start and end a comment. This works best | |
409 for C code, but also works for e-mail (">" at start of the line) and | |
827 | 410 other types of text. The |=| operator can be used to re-indent |
7 | 411 lines. |
412 | |
827 | 413 For many other languages an indent plugin is present to support |
414 automatic indenting. |30.3| | |
415 | |
416 Searching for words in included files. |include-search| | |
417 The |[i| command can be used to search for a match of the word under | |
7 | 418 the cursor in the current and included files. The 'include' option |
1668 | 419 can be set to a pattern that describes a command to include a file |
7 | 420 (the default is for C programs). |
827 | 421 The |[I| command lists all matches, the |[_CTRL-I| command jumps to |
7 | 422 a match. |
827 | 423 The |[d|, |[D| and |[_CTRL-D| commands do the same, but only for |
7 | 424 lines where the pattern given with the 'define' option matches. |
425 | |
827 | 426 Automatic commands. |autocommand| |
7 | 427 Commands can be automatically executed when reading a file, writing a |
428 file, jumping to another buffer, etc., depending on the file name. | |
429 This is useful to set options and mappings for C programs, | |
430 documentation, plain text, e-mail, etc. This also makes it possible | |
431 to edit compressed files. | |
432 | |
827 | 433 Scripts and Expressions. |expression| |
434 Commands have been added to form up a powerful script language. | |
7 | 435 |:if| Conditional execution, which can be used for example |
436 to set options depending on the value of $TERM. | |
437 |:while| Repeat a number of commands. | |
827 | 438 |:for| Loop over a list. |
7 | 439 |:echo| Print the result of an expression. |
440 |:let| Assign a value to an internal variable, option, etc. | |
827 | 441 Variable types are Number, String, List and Dictionary. |
7 | 442 |:execute| Execute a command formed by an expression. |
827 | 443 |:try| Catch exceptions. |
444 etc., etc. See |eval|. | |
445 Debugging and profiling are supported. |debug-scripts| |profile| | |
446 If this is not enough, an interface is provided to |Python|, |Ruby|, | |
2320
966a5609669e
Added Lua interfae. (Luis Carvalho)
Bram Moolenaar <bram@vim.org>
parents:
2154
diff
changeset
|
447 |Tcl|, |Lua|, |Perl| and |MzScheme|. |
7 | 448 |
827 | 449 Viminfo. |viminfo-file| |
7 | 450 The command-line history, marks and registers can be stored in a file |
451 that is read on startup. This can be used to repeat a search command | |
452 or command-line command after exiting and restarting Vim. It is also | |
827 | 453 possible to jump right back to where the last edit stopped with |'0|. |
7 | 454 The 'viminfo' option can be set to select which items to store in the |
455 .viminfo file. This is off by default. | |
456 | |
827 | 457 Printing. |printing| |
458 The |:hardcopy| command sends text to the printer. This can include | |
459 syntax highlighting. | |
460 | |
461 Mouse support. |mouse-using| | |
7 | 462 The mouse is supported in the GUI version, in an xterm for Unix, for |
1618 | 463 BSDs with sysmouse, for Linux with gpm, for MS-DOS, and Win32. It |
464 can be used to position the cursor, select the visual area, paste a | |
465 register, etc. | |
7 | 466 |
827 | 467 Usage of key names. |<>| |key-notation| |
7 | 468 Special keys now all have a name like <Up>, <End>, etc. |
469 This name can be used in mappings, to make it easy to edit them. | |
470 | |
827 | 471 Editing binary files. |edit-binary| |
7 | 472 Vim can edit binary files. You can change a few characters in an |
473 executable file, without corrupting it. Vim doesn't remove NUL | |
474 characters (they are represented as <NL> internally). | |
475 |-b| command-line argument to start editing a binary file | |
827 | 476 |'binary'| Option set by |-b|. Prevents adding an <EOL> for the |
7 | 477 last line in the file. |
478 | |
827 | 479 Multi-language support. |multi-lang| |
7 | 480 Files in double-byte or multi-byte encodings can be edited. There is |
481 UTF-8 support to be able to edit various languages at the same time, | |
482 without switching fonts. |UTF-8| | |
483 Messages and menus are available in different languages. | |
484 | |
827 | 485 Move cursor beyond lines. |
486 When the 'virtualedit' option is set the cursor can move all over the | |
487 screen, also where there is no text. This is useful to edit tables | |
488 and figures easily. | |
489 | |
7 | 490 ============================================================================== |
491 5. Other vim features *other-features* | |
492 | |
493 A random collection of nice extra features. | |
494 | |
495 | |
496 When Vim is started with "-s scriptfile", the characters read from | |
497 "scriptfile" are treated as if you typed them. If end of file is reached | |
498 before the editor exits, further characters are read from the console. | |
499 | |
500 The "-w" option can be used to record all typed characters in a script file. | |
501 This file can then be used to redo the editing, possibly on another file or | |
502 after changing some commands in the script file. | |
503 | |
504 The "-o" option opens a window for each argument. "-o4" opens four windows. | |
505 | |
506 Vi requires several termcap entries to be able to work full-screen. Vim only | |
507 requires the "cm" entry (cursor motion). | |
508 | |
509 | |
510 In command mode: | |
511 | |
512 When the 'showcmd' option is set, the command characters are shown in the last | |
513 line of the screen. They are removed when the command is finished. | |
514 | |
515 If the 'ruler' option is set, the current cursor position is shown in the | |
516 last line of the screen. | |
517 | |
518 "U" still works after having moved off the last changed line and after "u". | |
519 | |
520 Characters with the 8th bit set are displayed. The characters between '~' and | |
521 0xa0 are displayed as "~?", "~@", "~A", etc., unless they are included in the | |
522 'isprint' option. | |
523 | |
524 "][" goes to the next ending of a C function ('}' in column 1). | |
525 "[]" goes to the previous ending of a C function ('}' in column 1). | |
526 | |
527 "]f", "[f" and "gf" start editing the file whose name is under the cursor. | |
528 CTRL-W f splits the window and starts editing the file whose name is under | |
529 the cursor. | |
530 | |
531 "*" searches forward for the identifier under the cursor, "#" backward. | |
532 "K" runs the program defined by the 'keywordprg' option, with the identifier | |
533 under the cursor as argument. | |
534 | |
535 "%" can be preceded with a count. The cursor jumps to the line that | |
536 percentage down in the file. The normal "%" function to jump to the matching | |
537 brace skips braces inside quotes. | |
538 | |
539 With the CTRL-] command, the cursor may be in the middle of the identifier. | |
540 | |
541 The used tags are remembered. Commands that can be used with the tag stack | |
542 are CTRL-T, ":pop" and ":tag". ":tags" lists the tag stack. | |
543 | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
544 Vi uses 'wrapscan' when searching for a tag. When jumping to a tag Vi starts |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
545 searching in line 2 of another file. It does not find a tag in line 1 of |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
546 another file when 'wrapscan' is not set. |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
547 |
7 | 548 The 'tags' option can be set to a list of tag file names. Thus multiple |
549 tag files can be used. For file names that start with "./", the "./" is | |
550 replaced with the path of the current file. This makes it possible to use a | |
551 tags file in the same directory as the file being edited. | |
16610 | 552 {Vi: always uses binary search in some versions} |
553 {Vi does not have the security prevention for commands in tag files} | |
7 | 554 |
555 Previously used file names are remembered in the alternate file name list. | |
556 CTRL-^ accepts a count, which is an index in this list. | |
557 ":files" command shows the list of alternate file names. | |
558 "#<N>" is replaced with the <N>th alternate file name in the list. | |
559 "#<" is replaced with the current file name without extension. | |
560 | |
561 Search patterns have more features. The <NL> character is seen as part of the | |
562 search pattern and the substitute string of ":s". Vi sees it as the end of | |
563 the command. | |
564 | |
565 Searches can put the cursor on the end of a match and may include a character | |
566 offset. | |
567 | |
568 Count added to "~", ":next", ":Next", "n" and "N". | |
569 | |
570 The command ":next!" with 'autowrite' set does not write the file. In vi the | |
571 file was written, but this is considered to be a bug, because one does not | |
572 expect it and the file is not written with ":rewind!". | |
573 | |
574 In Vi when entering a <CR> in replace mode deletes a character only when 'ai' | |
575 is set (but does not show it until you hit <Esc>). Vim always deletes a | |
576 character (and shows it immediately). | |
577 | |
578 Added :wnext command. Same as ":write" followed by ":next". | |
579 | |
580 The ":w!" command always writes, also when the file is write protected. In Vi | |
5690 | 581 you would have to do ":!chmod +w %:S" and ":set noro". |
7 | 582 |
583 When 'tildeop' has been set, "~" is an operator (must be followed by a | |
584 movement command). | |
585 | |
586 With the "J" (join) command you can reset the 'joinspaces' option to have only | |
587 one space after a period (Vi inserts two spaces). | |
588 | |
589 "cw" can be used to change white space formed by several characters (Vi is | |
590 confusing: "cw" only changes one space, while "dw" deletes all white space). | |
16610 | 591 {Vi: "cw" when on a blank followed by other blanks changes only the first |
592 blank; this is probably a bug, because "dw" deletes all the blanks} | |
7 | 593 |
594 "o" and "O" accept a count for repeating the insert (Vi clears a part of | |
595 display). | |
596 | |
597 Flags after Ex commands not supported (no plans to include it). | |
598 | |
599 On non-UNIX systems ":cd" command shows current directory instead of going to | |
600 the home directory (there isn't one). ":pwd" prints the current directory on | |
601 all systems. | |
602 | |
603 After a ":cd" command the file names (in the argument list, opened files) | |
604 still point to the same files. In Vi ":cd" is not allowed in a changed file; | |
605 otherwise the meaning of file names change. | |
606 | |
607 ":source!" command reads Vi commands from a file. | |
608 | |
609 ":mkexrc" command writes current modified options and mappings to a ".exrc" | |
610 file. ":mkvimrc" writes to a ".vimrc" file. | |
611 | |
612 No check for "tail recursion" with mappings. This allows things like | |
613 ":map! foo ^]foo". | |
614 | |
615 When a mapping starts with number, vi loses the count typed before it (e.g. | |
616 when using the mapping ":map g 4G" the command "7g" goes to line 4). This is | |
617 considered a vi bug. Vim concatenates the counts (in the example it becomes | |
618 "74G"), as most people would expect. | |
619 | |
620 The :put! command inserts the contents of a register above the current line. | |
621 | |
622 The "p" and "P" commands of vi cannot be repeated with "." when the putted | |
623 text is less than a line. In Vim they can always be repeated. | |
624 | |
625 ":noremap" command can be used to enter a mapping that will not be remapped. | |
626 This is useful to exchange the meaning of two keys. ":cmap", ":cunmap" and | |
627 ":cnoremap" can be used for mapping in command-line editing only. ":imap", | |
628 ":iunmap" and ":inoremap" can be used for mapping in insert mode only. | |
629 Similar commands exist for abbreviations: ":noreabbrev", ":iabbrev" | |
630 ":cabbrev", ":iunabbrev", ":cunabbrev", ":inoreabbrev", ":cnoreabbrev". | |
631 | |
632 In Vi the command ":map foo bar" would remove a previous mapping | |
633 ":map bug foo". This is considered a bug, so it is not included in Vim. | |
634 ":unmap! foo" does remove ":map! bug foo", because unmapping would be very | |
635 difficult otherwise (this is vi compatible). | |
636 | |
637 The ':' register contains the last command-line. | |
638 The '%' register contains the current file name. | |
639 The '.' register contains the last inserted text. | |
640 | |
641 ":dis" command shows the contents of the yank registers. | |
642 | |
643 CTRL-O/CTRL-I can be used to jump to older/newer positions. These are the | |
644 same positions as used with the '' command, but may be in another file. The | |
645 ":jumps" command lists the older positions. | |
646 | |
647 If the 'shiftround' option is set, an indent is rounded to a multiple of | |
648 'shiftwidth' with ">" and "<" commands. | |
649 | |
650 The 'scrolljump' option can be set to the minimum number of lines to scroll | |
651 when the cursor gets off the screen. Use this when scrolling is slow. | |
652 | |
653 The 'scrolloff' option can be set to the minimum number of lines to keep | |
654 above and below the cursor. This gives some context to where you are | |
655 editing. When set to a large number the cursor line is always in the middle | |
656 of the window. | |
657 | |
658 Uppercase marks can be used to jump between files. The ":marks" command lists | |
659 all currently set marks. The commands "']" and "`]" jump to the end of the | |
660 previous operator or end of the text inserted with the put command. "'[" and | |
16610 | 661 "`[" do jump to the start. {Vi: no uppercase marks} |
7 | 662 |
663 The 'shelltype' option can be set to reflect the type of shell used on the | |
664 Amiga. | |
665 | |
666 The 'highlight' option can be set for the highlight mode to be used for | |
667 several commands. | |
668 | |
669 The CTRL-A (add) and CTRL-X (subtract) commands are new. The count to the | |
670 command (default 1) is added to/subtracted from the number at or after the | |
671 cursor. That number may be decimal, octal (starts with a '0') or hexadecimal | |
672 (starts with '0x'). Very useful in macros. | |
673 | |
674 With the :set command the prefix "inv" can be used to invert boolean options. | |
675 | |
676 In both Vi and Vim you can create a line break with the ":substitute" command | |
677 by using a CTRL-M. For Vi this means you cannot insert a real CTRL-M in the | |
678 text. With Vim you can put a real CTRL-M in the text by preceding it with a | |
679 CTRL-V. | |
680 | |
681 | |
682 In Insert mode: | |
683 | |
684 If the 'revins' option is set, insert happens backwards. This is for typing | |
685 Hebrew. When inserting normal characters the cursor will not be shifted and | |
686 the text moves rightwards. Backspace, CTRL-W and CTRL-U will also work in | |
687 the opposite direction. CTRL-B toggles the 'revins' option. In replace mode | |
688 'revins' has no effect. Only when enabled at compile time. | |
689 | |
690 The backspace key can be used just like CTRL-D to remove auto-indents. | |
691 | |
692 You can backspace, CTRL-U and CTRL-W over line breaks if the 'backspace' (bs) | |
693 option includes "eol". You can backspace over the start of insert if the | |
694 'backspace' option includes "start". | |
695 | |
3750 | 696 When the 'paste' option is set, a few options are reset and mapping in insert |
7 | 697 mode and abbreviation are disabled. This allows for pasting text in windowing |
698 systems without unexpected results. When the 'paste' option is reset, the old | |
699 option values are restored. | |
700 | |
701 CTRL-T/CTRL-D always insert/delete an indent in the current line, no matter | |
702 what column the cursor is in. | |
703 | |
704 CTRL-@ (insert previously inserted text) works always (Vi: only when typed as | |
705 first character). | |
706 | |
707 CTRL-A works like CTRL-@ but does not leave insert mode. | |
708 | |
18186 | 709 CTRL-R {register} can be used to insert the contents of a register. |
7 | 710 |
711 When the 'smartindent' option is set, C programs will be better auto-indented. | |
712 With 'cindent' even more. | |
713 | |
714 CTRL-Y and CTRL-E can be used to copy a character from above/below the | |
715 current cursor position. | |
716 | |
717 After CTRL-V you can enter a three digit decimal number. This byte value is | |
718 inserted in the text as a single character. Useful for international | |
719 characters that are not on your keyboard. | |
720 | |
721 When the 'expandtab' (et) option is set, a <Tab> is expanded to the | |
722 appropriate number of spaces. | |
723 | |
724 The window always reflects the contents of the buffer (Vi does not do this | |
725 when changing text and in some other cases). | |
726 | |
727 If Vim is compiled with DIGRAPHS defined, digraphs are supported. A set of | |
728 normal digraphs is included. They are shown with the ":digraph" command. | |
729 More can be added with ":digraph {char1}{char2} {number}". A digraph is | |
730 entered with "CTRL-K {char1} {char2}" or "{char1} BS {char2}" (only when | |
731 'digraph' option is set). | |
732 | |
733 When repeating an insert, e.g. "10atest <Esc>" vi would only handle wrapmargin | |
734 for the first insert. Vim does it for all. | |
735 | |
736 A count to the "i" or "a" command is used for all the text. Vi uses the count | |
737 only for one line. "3iabc<NL>def<Esc>" would insert "abcabcabc<NL>def" in Vi | |
738 but "abc<NL>defabc<NL>defabc<NL>def" in Vim. | |
739 | |
740 | |
741 In Command-line mode: | |
742 | |
235 | 743 <Esc> terminates the command-line without executing it. In vi the command |
7 | 744 line would be executed, which is not what most people expect (hitting <Esc> |
745 should always get you back to command mode). To avoid problems with some | |
746 obscure macros, an <Esc> in a macro will execute the command. If you want a | |
747 typed <Esc> to execute the command like vi does you can fix this with | |
748 ":cmap ^V<Esc> ^V<CR>" | |
749 | |
750 General: | |
751 | |
752 The 'ttimeout' option is like 'timeout', but only works for cursor and | |
753 function keys, not for ordinary mapped characters. The 'timeoutlen' option | |
754 gives the number of milliseconds that is waited for. If the 'esckeys' option | |
755 is not set, cursor and function keys that start with <Esc> are not recognized | |
756 in insert mode. | |
757 | |
758 There is an option for each terminal string. Can be used when termcap is not | |
759 supported or to change individual strings. | |
760 | |
761 The 'fileformat' option can be set to select the <EOL>: "dos" <CR><NL>, "unix" | |
762 <NL> or "mac" <CR>. | |
763 When the 'fileformats' option is not empty, Vim tries to detect the type of | |
764 <EOL> automatically. The 'fileformat' option is set accordingly. | |
765 | |
766 On systems that have no job control (older Unix systems and non-Unix systems) | |
767 the CTRL-Z, ":stop" or ":suspend" command starts a new shell. | |
768 | |
769 If Vim is started on the Amiga without an interactive window for output, a | |
770 window is opened (and :sh still works). You can give a device to use for | |
771 editing with the |-d| argument, e.g. "-d con:20/20/600/150". | |
772 | |
773 The 'columns' and 'lines' options are used to set or get the width and height | |
774 of the display. | |
775 | |
776 Option settings are read from the first and last few lines of the file. | |
777 Option 'modelines' determines how many lines are tried (default is 5). Note | |
778 that this is different from the Vi versions that can execute any Ex command | |
779 in a modeline (a major security problem). |trojan-horse| | |
780 | |
781 If the 'insertmode' option is set (e.g. in .exrc), Vim starts in insert mode. | |
782 And it comes back there, when pressing <Esc>. | |
783 | |
784 Undo information is kept in memory. Available memory limits the number and | |
785 size of change that can be undone. This may be a problem with MS-DOS, is | |
786 hardly a problem on the Amiga and almost never with Unix and Win32. | |
787 | |
788 If the 'backup' or 'writebackup' option is set: Before a file is overwritten, | |
789 a backup file (.bak) is made. If the "backup" option is set it is left | |
790 behind. | |
791 | |
792 Vim creates a file ending in ".swp" to store parts of the file that have been | |
793 changed or that do not fit in memory. This file can be used to recover from | |
794 an aborted editing session with "vim -r file". Using the swap file can be | |
795 switched off by setting the 'updatecount' option to 0 or starting Vim with | |
796 the "-n" option. Use the 'directory' option for placing the .swp file | |
797 somewhere else. | |
798 | |
799 Vim is able to work correctly on filesystems with 8.3 file names, also when | |
800 using messydos or crossdos filesystems on the Amiga, or any 8.3 mounted | |
801 filesystem under Unix. See |'shortname'|. | |
802 | |
803 Error messages are shown at least one second (Vi overwrites error messages). | |
804 | |
805 If Vim gives the |hit-enter| prompt, you can hit any key. Characters other | |
16610 | 806 than <CR>, <NL> and <Space> are interpreted as the (start of) a command. |
807 {Vi: only ":" commands are interpreted} | |
7 | 808 |
809 The contents of the numbered and unnamed registers is remembered when | |
810 changing files. | |
811 | |
812 The "No lines in buffer" message is a normal message instead of an error | |
813 message, since that may cause a mapping to be aborted. | |
16610 | 814 {Vi: error messages may be overwritten with other messages before you have a |
815 chance to read them} | |
7 | 816 |
817 The AUX: device of the Amiga is supported. | |
818 | |
819 ============================================================================== | |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
820 6. Supported Vi features *vi-features* |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
821 |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
822 Vim supports nearly all Vi commands and mostly in the same way. That is when |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
823 the 'compatible' option is set and 'cpoptions' contains all flags. What the |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
824 effect is of resetting 'compatible' and removing flags from 'cpoptions' can be |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
825 found at the help for the specific command. |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
826 |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
827 The help files used to mark features that are in Vim but not in Vi with {not |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
828 in Vi}. However, since these remarks cluttered the help files we now do it |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
829 the other way around: Below is listed what Vi already supported. Anything |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
830 else has been added by Vim. |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
831 |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
832 |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
833 The following Ex commands are supported by Vi: ~ |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
834 |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
835 `:abbreviate` enter abbreviation |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
836 `:append` append text |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
837 `:args` print the argument list |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
838 `:cd` change directory; Vi: no "cd -" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
839 `:change` replace a line or series of lines |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
840 `:chdir` change directory |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
841 `:copy` copy lines |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
842 `:delete` delete lines |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
843 `:edit` edit a file |
16610 | 844 `:exit` same as `:xit` |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
845 `:file` show or set the current file name; Vi: without the column number |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
846 `:global` execute commands for matching lines |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
847 `:insert` insert text |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
848 `:join` join lines; Vi: not :join! |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
849 `:k` set a mark |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
850 `:list` print lines |
16610 | 851 `:map` show or enter a mapping |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
852 `:mark` set a mark |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
853 `:move` move lines |
16610 | 854 `:Next` go to previous file in the argument list {Vi: no count} |
855 `:next` go to next file in the argument list {Vi: no count} | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
856 `:number` print lines with line number |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
857 `:open` start open mode (not implemented in Vim) |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
858 `:pop` jump to older entry in tag stack (only in some versions) |
16610 | 859 `:preserve` write all text to swap file {Vi: might also exit} |
860 `:previous` same as `:Next` {Vi: only in some versions} | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
861 `:print` print lines |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
862 `:put` insert contents of register in the text |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
863 `:quit` quit Vi |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
864 `:read` read file into the text |
16610 | 865 `:recover` recover a file from a swap file {Vi: recovers in another way |
866 and sends mail if there is something to recover} | |
867 `:rewind` go to the first file in the argument list; no ++opt | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
868 `:set` set option; but not `:set inv{option}`, `:set option&`, |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
869 `:set all&`, `:set option+=value`, `:set option^=value` |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
870 `:set option-=value` `:set option<` |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
871 `:shell` escape to a shell |
16808 | 872 `:source` read Vi or Ex commands from a file |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
873 `:stop` suspend the editor or escape to a shell |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
874 `:substitute` find and replace text; Vi: no '&', 'i', 's', 'r' or 'I' flag, |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
875 confirm prompt only supports 'y' and 'n', no highlighting |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
876 `:suspend` same as ":stop" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
877 `:t` same as ":copy" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
878 `:tag` jump to tag |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
879 `:unabbreviate` remove abbreviation |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
880 `:undo` undo last change {Vi: only one level} |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
881 `:unmap` remove mapping |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
882 `:vglobal` execute commands for not matching lines |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
883 `:version` print version number and other info |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
884 `:visual` same as ":edit", but turns off "Ex" mode |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
885 `:wq` write to a file and quit Vi |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
886 `:write` write to a file |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
887 `:xit` write if buffer changed and quit Vi |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
888 `:yank` yank lines into a register |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
889 `:z` print some lines {not in all versions of Vi} |
16610 | 890 `:!` filter lines or execute an external command |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
891 `:"` comment |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
892 `:#` same as ":number" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
893 `:*` execute contents of a register |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
894 `:&` repeat last ":substitute" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
895 `:<` shift lines one 'shiftwidth' left |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
896 `:=` print the cursor line number |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
897 `:>` shift lines one 'shiftwidth' right |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
898 `:@` execute contents of a register; but not `:@`; `:@@` only in |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
899 some versions |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
900 |
16610 | 901 Common for these commands is that Vi doesn't support the ++opt argument on |
902 `:edit` and other commands that open a file. | |
903 | |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
904 |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
905 The following Normal mode commands are supported by Vi: ~ |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
906 |
16808 | 907 note: See the beginning of |normal-index| for the meaning of WORD, N, Nmove |
908 and etc in the description text. | |
909 | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
910 |CTRL-B| scroll N screens Backwards |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
911 |CTRL-C| interrupt current (search) command |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
912 |CTRL-D| scroll Down N lines (default: half a screen); Vim scrolls |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
913 'scroll' screen lines, Vi scrolls file lines; makes a |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
914 difference when lines wrap |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
915 |CTRL-E| scroll N lines upwards (N lines Extra) |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
916 |CTRL-F| scroll N screens Forward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
917 |CTRL-G| display current file name and position |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
918 |<BS>| same as "h" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
919 |CTRL-H| same as "h" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
920 |<NL>| same as "j" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
921 |CTRL-J| same as "j" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
922 |CTRL-L| redraw screen |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
923 |<CR>| cursor to the first CHAR N lines lower |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
924 |CTRL-M| same as <CR> |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
925 |CTRL-N| same as "j" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
926 |CTRL-P| same as "k" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
927 |CTRL-R| in some Vi versions: same as CTRL-L |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
928 |CTRL-T| jump to N older Tag in tag list |
16808 | 929 |CTRL-U| N lines Upwards (default: half a screen) {Vi used file lines |
930 while Vim scrolls 'scroll' screen lines; makes a difference | |
931 when lines wrap} | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
932 |CTRL-Y| scroll N lines downwards |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
933 |CTRL-Z| suspend program (or start new shell) |
16610 | 934 |CTRL-]| :ta to ident under cursor {Vi: identifier after the cursor} |
935 |CTRL-^| edit alternate file {Vi: no count} | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
936 |<Space>| same as "l" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
937 |!| filter Nmove text through the {filter} command |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
938 |!!| filter N lines through the {filter} command |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
939 " use register {a-zA-Z0-9.%#:-"} for next delete, yank or put |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
940 (uppercase to append) ({.%#:} only work with put) |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
941 |$| cursor to the end of Nth next line |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
942 |%| find the next (curly/square) bracket on this line and go to |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
943 its match, or go to matching comment bracket, or go to |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
944 matching preprocessor directive (Vi: no count supported) |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
945 |&| repeat last :s |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
946 |'| jump to mark (Vi: only lowercase marks) |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
947 |(| cursor N sentences backward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
948 |)| cursor N sentences forward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
949 |+| same as <CR> |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
950 |,| repeat latest f, t, F or T in opposite direction N times |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
951 |-| cursor to the first CHAR N lines higher |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
952 |.| repeat last change with count replaced with N |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
953 |/| search forward for the Nth occurrence of {pattern} |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
954 |0| cursor to the first char of the line |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
955 |:| start entering an Ex command |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
956 |;| repeat latest f, t, F or T N times |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
957 |<| shift Nmove lines one 'shiftwidth' leftwards |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
958 |<<| shift N lines one 'shiftwidth' leftwards |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
959 |=| filter Nmove lines through "indent" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
960 |==| filter N lines through "indent" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
961 |>| shift Nmove lines one 'shiftwidth' rightwards |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
962 |>>| shift N lines one 'shiftwidth' rightwards |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
963 |?| search backward for the Nth previous occurrence of {pattern} |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
964 |@| execute the contents of register {a-z} N times |
16610 | 965 {Vi: only named registers} |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
966 |@@| repeat the previous @{a-z} N times |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
967 |A| append text after the end of the line N times |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
968 |B| cursor N WORDS backward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
969 |C| change from the cursor position to the end of the line |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
970 |D| delete the characters under the cursor until the end of the |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
971 line and N-1 more lines [into register x]; synonym for "d$" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
972 |E| cursor forward to the end of WORD N |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
973 |F| cursor to the Nth occurrence of {char} to the left |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
974 |G| cursor to line N, default last line |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
975 |H| cursor to line N from top of screen |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
976 |I| insert text before the first CHAR on the line N times |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
977 |J| Join N lines; default is 2 |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
978 |L| cursor to line N from bottom of screen |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
979 |M| cursor to middle line of screen |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
980 |N| repeat the latest '/' or '?' N times in opposite direction |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
981 |O| begin a new line above the cursor and insert text, repeat N |
16610 | 982 times {Vi: blank [count] screen lines} |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
983 |P| put the text [from register x] before the cursor N times |
16610 | 984 {Vi: no count} |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
985 |Q| switch to "Ex" mode |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
986 |R| enter replace mode: overtype existing characters, repeat the |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
987 entered text N-1 times |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
988 |S| delete N lines [into register x] and start insert; synonym for |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
989 "cc". |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
990 |T| cursor till after Nth occurrence of {char} to the left |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
991 |U| undo all latest changes on one line |
16610 | 992 {Vi: while not moved off of the last modified line} |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
993 |W| cursor N WORDS forward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
994 |X| delete N characters before the cursor [into register x] |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
995 |Y| yank N lines [into register x]; synonym for "yy" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
996 |ZZ| store current file if modified, and exit |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
997 |[[| cursor N sections backward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
998 |]]| cursor N sections forward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
999 |^| cursor to the first CHAR of the line |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1000 |_| cursor to the first CHAR N - 1 lines lower |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1001 |`| cursor to the mark {a-zA-Z0-9} |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1002 |a| append text after the cursor N times |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1003 |b| cursor N words backward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1004 |c| delete Nmove text [into register x] and start insert |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1005 |cc| delete N lines [into register x] and start insert |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1006 |d| delete Nmove text [into register x] |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1007 |dd| delete N lines [into register x] |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1008 |e| cursor forward to the end of word N |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1009 |f| cursor to Nth occurrence of {char} to the right |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1010 |h| cursor N chars to the left |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1011 |i| insert text before the cursor N times |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1012 |j| cursor N lines downward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1013 |k| cursor N lines upward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1014 |l| cursor N chars to the right |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1015 |m| set mark {A-Za-z} at cursor position |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1016 |n| repeat the latest '/' or '?' N times |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1017 |o| begin a new line below the cursor and insert text |
16610 | 1018 {Vi: blank [count] screen lines} |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1019 |p| put the text [from register x] after the cursor N times |
16610 | 1020 {Vi: no count} |
1021 |r| replace N chars with {char} {Vi: CTRL-V <CR> still replaces | |
1022 with a line break, cannot replace something with a <CR>} | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1023 |s| (substitute) delete N characters [into register x] and start |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1024 insert |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1025 |t| cursor till before Nth occurrence of {char} to the right |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1026 |u| undo changes {Vi: only one level} |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1027 |w| cursor N words forward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1028 |x| delete N characters under and after the cursor [into register |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1029 x] |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1030 |y| yank Nmove text [into register x] |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1031 |yy| yank N lines [into register x] |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1032 |z<CR>| current line to the top |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1033 |z-| current line to the bottom |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1034 |z+| cursor on line N |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1035 |z^| cursor on line N |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1036 |{| cursor N paragraphs backward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1037 | cursor to column N |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1038 |}| cursor N paragraphs forward |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1039 |~| switch case of N characters under the cursor; Vim: depends on |
16610 | 1040 'tildeop' {Vi: no count, no 'tildeop'} |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1041 |<Del>| same as "x" |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1042 |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1043 |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1044 The following commands are supported in Insert mode by Vi: ~ |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1045 |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1046 CTRL-@ insert previously inserted text and stop insert |
16610 | 1047 {Vi: only when typed as first char, only up to 128 chars} |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1048 CTRL-C quit insert mode, without checking for abbreviation, unless |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1049 'insertmode' set. |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1050 CTRL-D delete one shiftwidth of indent in the current line |
16610 | 1051 {Vi: CTRL-D works only when used after autoindent} |
1052 <BS> delete character before the cursor {Vi: does not delete | |
1053 autoindents, does not cross lines, does not delete past start | |
1054 position of insert} | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1055 CTRL-H same as <BS> |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1056 <Tab> insert a <Tab> character |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1057 CTRL-I same as <Tab> |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1058 <NL> same as <CR> |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1059 CTRL-J same as <CR> |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1060 <CR> begin new line |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1061 CTRL-M same as <CR> |
16610 | 1062 CTRL-T insert one shiftwidth of indent in current line {Vi: only when |
1063 in indent} | |
1064 CTRL-V {char} insert next non-digit literally {Vi: no decimal byte entry} | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1065 CTRL-W delete word before the cursor |
16808 | 1066 CTRL-Z when 'insertmode' set: suspend Vi |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1067 <Esc> end insert mode (unless 'insertmode' set) |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1068 CTRL-[ same as <Esc> |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1069 0 CTRL-D delete all indent in the current line |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1070 ^ CTRL-D delete all indent in the current line, restore it in the next |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1071 line |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1072 <Del> delete character under the cursor |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1073 |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1074 |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1075 The following options are supported by Vi: ~ |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1076 |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1077 'autoindent' 'ai' take indent for new line from previous line |
16610 | 1078 {Vi does this slightly differently: After the |
1079 indent is deleted when typing <Esc> or <CR>, the | |
1080 cursor position when moving up or down is after | |
1081 the deleted indent; Vi puts the cursor somewhere | |
1082 in the deleted indent}. | |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1083 'autowrite' 'aw' automatically write file if changed |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1084 'directory' 'dir' list of directory names for the swap file |
16610 | 1085 {Vi: directory to put temp file in, defaults to |
1086 "/tmp"} | |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1087 'edcompatible' 'ed' toggle flags of ":substitute" command |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1088 'errorbells' 'eb' ring the bell for error messages |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1089 'ignorecase' 'ic' ignore case in search patterns |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1090 'lines' number of lines in the display |
16610 | 1091 'lisp' automatic indenting for Lisp {Vi: Does it a little |
1092 bit differently} | |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1093 'list' show <Tab> and <EOL> |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1094 'magic' changes special characters in search patterns |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1095 'modeline' 'ml' recognize 'modelines' at start or end of file |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1096 {called modelines in some Vi versions} |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1097 'number' 'nu' print the line number in front of each line |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1098 'paragraphs' 'para' nroff macros that separate paragraphs |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1099 'prompt' 'prompt' enable prompt in Ex mode |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1100 'readonly' 'ro' disallow writing the buffer {Vim sets 'readonly' |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1101 when editing a file with `:view`} |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1102 'remap' allow mappings to work recursively |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1103 'report' threshold for reporting nr. of lines changed |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1104 'scroll' 'scr' lines to scroll with CTRL-U and CTRL-D |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1105 'sections' 'sect' nroff macros that separate sections |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1106 'shell' 'sh' name of shell to use for external commands |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1107 'shiftwidth' 'sw' number of spaces to use for (auto)indent step |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1108 'showmatch' 'sm' briefly jump to matching bracket if insert one |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1109 'showmode' 'smd' message on status line to show current mode |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1110 'tabstop' 'ts' number of spaces that <Tab> in file uses |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1111 'taglength' 'tl' number of significant characters for a tag |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1112 'tags' 'tag' list of file names used by the tag command |
16610 | 1113 {Vi: default is "tags /usr/lib/tags"} |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1114 'tagstack' 'tgst' push tags onto the tag stack {not in all versions |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1115 of Vi} |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1116 'term' name of the terminal |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1117 'terse' shorten some messages |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1118 'timeout' 'to' time out on mappings and key codes |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1119 'timeoutlen' 'tm' time for 'timeout' {only in some Vi versions} |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1120 'ttytype' 'tty' alias for 'term' |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1121 'verbose' 'vbs' give informative messages {only in some Vi |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1122 versions as a boolean option} |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1123 'warn' warn for shell command when buffer was changed |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1124 'window' 'wi' nr of lines to scroll for CTRL-F and CTRL-B |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1125 {Vi also uses the option to specify the number of |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1126 displayed lines} |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1127 'wrapmargin' 'wm' chars from the right where wrapping starts |
16610 | 1128 {Vi: works differently and less usefully} |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1129 'wrapscan' 'ws' searches wrap around the end of the file |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1130 'writeany' 'wa' write to file with no need for "!" override |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1131 |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1132 Also see |missing-options|. |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1133 |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1134 ============================================================================== |
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1135 7. Command-line arguments *cmdline-arguments* |
7 | 1136 |
1137 Different versions of Vi have different command-line arguments. This can be | |
1138 confusing. To help you, this section gives an overview of the differences. | |
1139 | |
1140 Five variants of Vi will be considered here: | |
1141 Elvis Elvis version 2.1b | |
1142 Nvi Nvi version 1.79 | |
1143 Posix Posix 1003.2 | |
1144 Vi Vi version 3.7 (for Sun 4.1.x) | |
1145 Vile Vile version 7.4 (incomplete) | |
1146 Vim Vim version 5.2 | |
1147 | |
1148 Only Vim is able to accept options in between and after the file names. | |
1149 | |
1150 +{command} Elvis, Nvi, Posix, Vi, Vim: Same as "-c {command}". | |
1151 | |
1152 - Nvi, Posix, Vi: Run Ex in batch mode. | |
1153 Vim: Read file from stdin (use -s for batch mode). | |
1154 | |
1155 -- Vim: End of options, only file names are following. | |
1156 | |
1157 --cmd {command} Vim: execute {command} before sourcing vimrc files. | |
1158 | |
1159 --echo-wid Vim: GTK+ echoes the Window ID on stdout | |
1160 | |
1161 --help Vim: show help message and exit. | |
1162 | |
1163 --literal Vim: take file names literally, don't expand wildcards. | |
1164 | |
1165 --nofork Vim: same as |-f| | |
1166 | |
1167 --noplugin[s] Vim: Skip loading plugins. | |
1168 | |
1169 --remote Vim: edit the files in another Vim server | |
1170 | |
1171 --remote-expr {expr} Vim: evaluate {expr} in another Vim server | |
1172 | |
1173 --remote-send {keys} Vim: send {keys} to a Vim server and exit | |
1174 | |
1175 --remote-silent {file} Vim: edit the files in another Vim server if possible | |
1176 | |
1177 --remote-wait Vim: edit the files in another Vim server and wait for it | |
1178 | |
1179 --remote-wait-silent Vim: like --remote-wait, no complaints if not possible | |
1180 | |
1181 --role {role} Vim: GTK+ 2: set role of main window | |
1182 | |
1183 --serverlist Vim: Output a list of Vim servers and exit | |
1184 | |
1185 --servername {name} Vim: Specify Vim server name | |
1186 | |
1187 --socketid {id} Vim: GTK window socket to run Vim in | |
1188 | |
1376 | 1189 --windowid {id} Vim: Win32 window ID to run Vim in |
1190 | |
7 | 1191 --version Vim: show version message and exit. |
1192 | |
1193 -? Vile: print usage summary and exit. | |
1194 | |
1195 -a Elvis: Load all specified file names into a window (use -o for | |
1196 Vim). | |
1197 | |
1198 -A Vim: Start in Arabic mode (when compiled with Arabic). | |
1199 | |
1200 -b {blksize} Elvis: Use {blksize} blocksize for the session file. | |
1201 -b Vim: set 'binary' mode. | |
1202 | |
1203 -C Vim: Compatible mode. | |
1204 | |
1205 -c {command} Elvis, Nvi, Posix, Vim: run {command} as an Ex command after | |
1206 loading the edit buffer. | |
1207 Vim: allow up to 10 "-c" arguments | |
1208 | |
1209 -d {device} Vim: Use {device} for I/O (Amiga only). {only when compiled | |
1210 without the |+diff| feature} | |
1211 -d Vim: start with 'diff' set. |vimdiff| | |
1212 | |
1213 -dev {device} Vim: Use {device} for I/O (Amiga only). | |
1214 | |
1215 -D Vim: debug mode. | |
1216 | |
1217 -e Elvis, Nvi, Vim: Start in Ex mode, as if the executable is | |
1218 called "ex". | |
1219 | |
1220 -E Vim: Start in improved Ex mode |gQ|, like "exim". | |
1221 | |
1222 -f Vim: Run GUI in foreground (Amiga: don't open new window). | |
1223 -f {session} Elvis: Use {session} as the session file. | |
1224 | |
1225 -F Vim: Start in Farsi mode (when compiled with Farsi). | |
1226 Nvi: Fast start, don't read the entire file when editing | |
1227 starts. | |
1228 | |
1229 -G {gui} Elvis: Use the {gui} as user interface. | |
1230 | |
1231 -g Vim: Start GUI. | |
1232 -g N Vile: start editing at line N | |
1233 | |
1234 -h Vim: Give help message. | |
1235 Vile: edit the help file | |
1236 | |
1237 -H Vim: start Hebrew mode (when compiled with it). | |
1238 | |
1239 -i Elvis: Start each window in Insert mode. | |
1240 -i {viminfo} Vim: Use {viminfo} for viminfo file. | |
1241 | |
16553
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1242 -L Vim: Same as "-r" {only in some versions of Vi: "List |
0e473e9e70c2
patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents:
16443
diff
changeset
|
1243 recoverable edit sessions"}. |
7 | 1244 |
1245 -l Nvi, Vi, Vim: Set 'lisp' and 'showmatch' options. | |
1246 | |
1247 -m Vim: Modifications not allowed to be written, resets 'write' | |
1248 option. | |
1249 | |
1250 -M Vim: Modifications not allowed, resets 'modifiable' and the | |
1251 'write' option. | |
1252 | |
1253 -N Vim: No-compatible mode. | |
1254 | |
1255 -n Vim: No swap file used. | |
1256 | |
1257 -nb[args] Vim: open a NetBeans interface connection | |
1258 | |
1259 -O[N] Vim: Like -o, but use vertically split windows. | |
1260 | |
1261 -o[N] Vim: Open [N] windows, or one for each file. | |
1262 | |
827 | 1263 -p[N] Vim: Open [N] tab pages, or one for each file. |
1264 | |
7 | 1265 -P {parent-title} Win32 Vim: open Vim inside a parent application window |
1266 | |
1267 -q {name} Vim: Use {name} for quickfix error file. | |
1268 -q{name} Vim: Idem. | |
1269 | |
1270 -R Elvis, Nvi, Posix, Vile, Vim: Set the 'readonly' option. | |
1271 | |
1272 -r Elvis, Nvi, Posix, Vi, Vim: Recovery mode. | |
1273 | |
1274 -S Nvi: Set 'secure' option. | |
1275 -S {script} Vim: source script after starting up. | |
1276 | |
1277 -s Nvi, Posix, Vim: Same as "-" (silent mode), when in Ex mode. | |
1278 Elvis: Sets the 'safer' option. | |
1279 -s {scriptin} Vim: Read from script file {scriptin}; only when not in Ex | |
1280 mode. | |
1281 -s {pattern} Vile: search for {pattern} | |
1282 | |
1283 -t {tag} Elvis, Nvi, Posix, Vi, Vim: Edit the file containing {tag}. | |
1284 -t{tag} Vim: Idem. | |
1285 | |
1286 -T {term} Vim: Set terminal name to {term}. | |
1287 | |
1288 -u {vimrc} Vim: Read initializations from {vimrc} file. | |
1289 | |
1290 -U {gvimrc} Vim: Read GUI initializations from {gvimrc} file. | |
1291 | |
1292 -v Nvi, Posix, Vi, Vim: Begin in Normal mode (visual mode, in Vi | |
1293 terms). | |
1294 Vile: View mode, no changes possible. | |
1295 | |
1296 -V Elvis, Vim: Verbose mode. | |
1297 -V{nr} Vim: Verbose mode with specified level. | |
1298 | |
1299 -w {size} Elvis, Posix, Nvi, Vi, Vim: Set value of 'window' to {size}. | |
1300 -w{size} Nvi, Vi: Same as "-w {size}". | |
1301 -w {name} Vim: Write to script file {name} (must start with non-digit). | |
1302 | |
1303 -W {name} Vim: Append to script file {name}. | |
1304 | |
1305 -x Vi, Vim: Ask for encryption key. See |encryption|. | |
1306 | |
1307 -X Vim: Don't connect to the X server. | |
1308 | |
1309 -y Vim: Start in easy mode, like |evim|. | |
1310 | |
1311 -Z Vim: restricted mode | |
1312 | |
1313 @{cmdfile} Vile: use {cmdfile} as startup file. | |
1314 | |
160 | 1315 ============================================================================== |
16443
32a543152dc0
patch 8.1.1226: {not in Vi} remarks get in the way of useful help text
Bram Moolenaar <Bram@vim.org>
parents:
14519
diff
changeset
|
1316 8. POSIX compliance *posix* *posix-compliance* |
160 | 1317 |
1118 | 1318 In 2005 the POSIX test suite was run to check the compatibility of Vim. Most |
164 | 1319 of the test was executed properly. There are the few things where Vim |
166 | 1320 is not POSIX compliant, even when run in Vi compatibility mode. |
8061
abd64cf67bcf
commit https://github.com/vim/vim/commit/38a55639d603823efcf2d2fdf542dbffdeb60b75
Christian Brabandt <cb@256bit.org>
parents:
7228
diff
changeset
|
1321 *$VIM_POSIX* |
164 | 1322 Set the $VIM_POSIX environment variable to have 'cpoptions' include the POSIX |
1323 flags when Vim starts up. This makes Vim run as POSIX as it can. That's | |
166 | 1324 a bit different from being Vi compatible. |
164 | 1325 |
1326 This is where Vim does not behave as POSIX specifies and why: | |
1327 | |
160 | 1328 *posix-screen-size* |
164 | 1329 The $COLUMNS and $LINES environment variables are ignored by Vim if |
1330 the size can be obtained from the terminal in a more reliable way. | |
1331 Add the '|' flag to 'cpoptions' to have $COLUMNS and $LINES overrule | |
1332 sizes obtained in another way. | |
160 | 1333 |
164 | 1334 The "{" and "}" commands don't stop at a "{" in the original Vi, but |
1335 POSIX specifies it does. Add the '{' flag to 'cpoptions' if you want | |
1336 it the POSIX way. | |
1337 | |
1338 The "D", "o" and "O" commands accept a count. Also when repeated. | |
1339 Add the '#' flag to 'cpoptions' if you want to ignore the count. | |
160 | 1340 |
166 | 1341 The ":cd" command fails if the current buffer is modified when the '.' |
1342 flag is present in 'cpoptions'. | |
1343 | |
1344 There is no ATTENTION message, the "A" flag is added to 'shortmess'. | |
1345 | |
1346 These are remarks about running the POSIX test suite: | |
1347 - vi test 33 sometimes fails for unknown reasons | |
1348 - vi test 250 fails; behavior will be changed in a new revision | |
1349 http://www.opengroup.org/austin/mailarchives/ag-review/msg01710.html | |
2608
7d8af31066c8
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2596
diff
changeset
|
1350 (link no longer works, perhaps it's now: |
7d8af31066c8
Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents:
2596
diff
changeset
|
1351 https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=show_archive.tpl&source=L&listname=austin-review-l&id=1711) |
166 | 1352 - vi test 310 fails; exit code non-zero when any error occurred? |
1353 - ex test 24 fails because test is wrong. Changed between SUSv2 and SUSv3. | |
1354 - ex tests 47, 48, 49, 72, 73 fail because .exrc file isn't read in silent | |
1355 mode and $EXINIT isn't used. | |
1356 - ex tests 76, 78 fail because echo is used instead of printf. (fixed) | |
1357 Also: problem with \s not changed to space. | |
1358 - ex test 355 fails because 'window' isn't used for "30z". | |
1359 - ex test 368 fails because shell command isn't echoed in silent mode. | |
1360 - ex test 394 fails because "=" command output isn't visible in silent mode. | |
1361 - ex test 411 fails because test file is wrong, contains stray ':'. | |
1362 - ex test 475 and 476 fail because reprint output isn't visible in silent mode. | |
1363 - ex test 480 and 481 fail because the tags file has spaces instead of a tab. | |
1364 - ex test 502 fails because .exrc isn't read in silent mode. | |
1365 - ex test 509 fails because .exrc isn't read in silent mode. and exit code is | |
1366 1 instead of 2. | |
1367 - ex test 534 fails because .exrc isn't read in silent mode. | |
1368 | |
160 | 1369 |
14519 | 1370 vim:tw=78:ts=8:noet:ft=help:norl: |