annotate runtime/doc/vi_diff.txt @ 26845:a6ccb6ec581c v8.2.3951

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