blob: 0ad12e80424e453436f94b446ef7fac3734c2487 [file] [log] [blame]
Bram Moolenaardad44732021-03-31 20:07:33 +02001*various.txt* For Vim version 8.2. Last change: 2021 Mar 23
Bram Moolenaar071d4272004-06-13 20:20:40 +00002
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7Various commands *various*
8
91. Various commands |various-cmds|
Bram Moolenaar91604412010-06-03 20:25:18 +0200102. Using Vim like less or more |less|
Bram Moolenaar071d4272004-06-13 20:20:40 +000011
12==============================================================================
131. Various commands *various-cmds*
14
15 *CTRL-L*
Bram Moolenaar30abd282005-06-22 22:35:10 +000016CTRL-L Clear and redraw the screen. The redraw may happen
17 later, after processing typeahead.
Bram Moolenaar071d4272004-06-13 20:20:40 +000018
19 *:redr* *:redraw*
20:redr[aw][!] Redraw the screen right now. When ! is included it is
21 cleared first.
22 Useful to update the screen halfway executing a script
23 or function. Also when halfway a mapping and
24 'lazyredraw' is set.
25
26 *:redraws* *:redrawstatus*
27:redraws[tatus][!] Redraw the status line of the current window. When !
28 is included all status lines are redrawn.
29 Useful to update the status line(s) when 'statusline'
30 includes an item that doesn't cause automatic
31 updating.
32
Bram Moolenaare12bab32019-01-08 22:02:56 +010033 *:redrawt* *:redrawtabline*
34:redrawt[abline] Redraw the tabline. Useful to update the tabline when
35 'tabline' includes an item that doesn't trigger
36 automatic updating.
37
Bram Moolenaar071d4272004-06-13 20:20:40 +000038 *N<Del>*
39<Del> When entering a number: Remove the last digit.
40 Note: if you like to use <BS> for this, add this
41 mapping to your .vimrc: >
42 :map CTRL-V <BS> CTRL-V <Del>
43< See |:fixdel| if your <Del> key does not do what you
44 want.
45
46:as[cii] or *ga* *:as* *:ascii*
47ga Print the ascii value of the character under the
Bram Moolenaar5f73ef82018-02-27 21:09:30 +010048 cursor in decimal, hexadecimal and octal.
49 Mnemonic: Get Ascii value.
50
51 For example, when the cursor is on a 'R':
Bram Moolenaar071d4272004-06-13 20:20:40 +000052 <R> 82, Hex 52, Octal 122 ~
53 When the character is a non-standard ASCII character,
54 but printable according to the 'isprint' option, the
Bram Moolenaar5f73ef82018-02-27 21:09:30 +010055 non-printable version is also given.
Bram Moolenaar664f3cf2019-12-07 16:03:51 +010056
Bram Moolenaar5f73ef82018-02-27 21:09:30 +010057 When the character is larger than 127, the <M-x> form
58 is also printed. For example:
Bram Moolenaar071d4272004-06-13 20:20:40 +000059 <~A> <M-^A> 129, Hex 81, Octal 201 ~
60 <p> <|~> <M-~> 254, Hex fe, Octal 376 ~
61 (where <p> is a special character)
Bram Moolenaar5f73ef82018-02-27 21:09:30 +010062
Bram Moolenaar071d4272004-06-13 20:20:40 +000063 The <Nul> character in a file is stored internally as
64 <NL>, but it will be shown as:
65 <^@> 0, Hex 00, Octal 000 ~
Bram Moolenaar5f73ef82018-02-27 21:09:30 +010066
Bram Moolenaar362e1a32006-03-06 23:29:24 +000067 If the character has composing characters these are
68 also shown. The value of 'maxcombine' doesn't matter.
Bram Moolenaar5f73ef82018-02-27 21:09:30 +010069
70 If the character can be inserted as a digraph, also
71 output the two characters that can be used to create
72 the character:
73 <ö> 246, Hex 00f6, Oct 366, Digr o: ~
74 This shows you can type CTRL-K o : to insert ö.
75
Bram Moolenaar071d4272004-06-13 20:20:40 +000076 *g8*
77g8 Print the hex values of the bytes used in the
78 character under the cursor, assuming it is in |UTF-8|
Bram Moolenaar362e1a32006-03-06 23:29:24 +000079 encoding. This also shows composing characters. The
80 value of 'maxcombine' doesn't matter.
81 Example of a character with two composing characters:
Bram Moolenaar071d4272004-06-13 20:20:40 +000082 e0 b8 81 + e0 b8 b9 + e0 b9 89 ~
Bram Moolenaarca003e12006-03-17 23:19:38 +000083
84 *8g8*
858g8 Find an illegal UTF-8 byte sequence at or after the
86 cursor. This works in two situations:
87 1. when 'encoding' is any 8-bit encoding
88 2. when 'encoding' is "utf-8" and 'fileencoding' is
89 any 8-bit encoding
90 Thus it can be used when editing a file that was
91 supposed to be UTF-8 but was read as if it is an 8-bit
92 encoding because it contains illegal bytes.
93 Does not wrap around the end of the file.
94 Note that when the cursor is on an illegal byte or the
Bram Moolenaar207f0092020-08-30 17:20:20 +020095 cursor is halfway a multibyte character the command
Bram Moolenaarca003e12006-03-17 23:19:38 +000096 won't move the cursor.
Bram Moolenaar071d4272004-06-13 20:20:40 +000097
Bram Moolenaar551dbcc2006-04-25 22:13:59 +000098 *:p* *:pr* *:print* *E749*
Bram Moolenaar5313dcb2005-02-22 08:56:13 +000099:[range]p[rint] [flags]
100 Print [range] lines (default current line).
Bram Moolenaar071d4272004-06-13 20:20:40 +0000101 Note: If you are looking for a way to print your text
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000102 on paper see |:hardcopy|. In the GUI you can use the
103 File.Print menu entry.
104 See |ex-flags| for [flags].
Bram Moolenaar818078d2016-08-27 21:58:42 +0200105 The |:filter| command can be used to only show lines
106 matching a pattern.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000107
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000108:[range]p[rint] {count} [flags]
Bram Moolenaar071d4272004-06-13 20:20:40 +0000109 Print {count} lines, starting with [range] (default
110 current line |cmdline-ranges|).
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000111 See |ex-flags| for [flags].
Bram Moolenaar071d4272004-06-13 20:20:40 +0000112
113 *:P* *:Print*
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000114:[range]P[rint] [count] [flags]
Bram Moolenaar071d4272004-06-13 20:20:40 +0000115 Just as ":print". Was apparently added to Vi for
116 people that keep the shift key pressed too long...
Bram Moolenaar166af9b2010-11-16 20:34:40 +0100117 Note: A user command can overrule this command.
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000118 See |ex-flags| for [flags].
Bram Moolenaar071d4272004-06-13 20:20:40 +0000119
120 *:l* *:list*
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000121:[range]l[ist] [count] [flags]
Bram Moolenaar071d4272004-06-13 20:20:40 +0000122 Same as :print, but display unprintable characters
Bram Moolenaarf9d5ca12010-08-01 16:13:51 +0200123 with '^' and put $ after the line. This can be
Bram Moolenaard58e9292011-02-09 17:07:58 +0100124 further changed with the 'listchars' option.
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000125 See |ex-flags| for [flags].
Bram Moolenaar071d4272004-06-13 20:20:40 +0000126
127 *:nu* *:number*
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000128:[range]nu[mber] [count] [flags]
Bram Moolenaar071d4272004-06-13 20:20:40 +0000129 Same as :print, but precede each line with its line
Bram Moolenaarfaa959a2006-02-20 21:37:40 +0000130 number. (See also 'highlight' and 'numberwidth'
131 option).
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000132 See |ex-flags| for [flags].
Bram Moolenaar071d4272004-06-13 20:20:40 +0000133
134 *:#*
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000135:[range]# [count] [flags]
136 synonym for :number.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000137
Bram Moolenaarc81e5e72007-05-05 18:24:42 +0000138 *:#!*
139:#!{anything} Ignored, so that you can start a Vim script with: >
Bram Moolenaar8c8de832008-06-24 22:58:06 +0000140 #!vim -S
Bram Moolenaarc81e5e72007-05-05 18:24:42 +0000141 echo "this is a Vim script"
142 quit
143<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000144 *:z* *E144*
Bram Moolenaar4466ad62020-11-21 13:16:30 +0100145:[range]z[+-^.=][count] Display several lines of text surrounding the line
146 specified with [range], or around the current line
147 if there is no [range].
Bram Moolenaar071d4272004-06-13 20:20:40 +0000148
Bram Moolenaar4466ad62020-11-21 13:16:30 +0100149 If there is a [count], that's how many lines you'll
150 see; if there is no [count] and only one window then
151 twice the value of the 'scroll' option is used,
152 otherwise the current window height minus 3 is used.
153 This is the value of "scr" in the table below.
154
155 If there is a [count] the 'window' option is set to
Bram Moolenaarb6b046b2011-12-30 13:11:27 +0100156 its value.
157
Bram Moolenaar071d4272004-06-13 20:20:40 +0000158 :z can be used either alone or followed by any of
Bram Moolenaar207f0092020-08-30 17:20:20 +0200159 several marks. These have the following effect:
Bram Moolenaar071d4272004-06-13 20:20:40 +0000160
Bram Moolenaar662db672011-03-22 14:05:35 +0100161 mark first line last line new cursor line ~
Bram Moolenaar071d4272004-06-13 20:20:40 +0000162 ---- ---------- --------- ------------
163 + current line 1 scr forward 1 scr forward
164 - 1 scr back current line current line
165 ^ 2 scr back 1 scr back 1 scr back
Bram Moolenaar2a8d1f82005-02-05 21:43:56 +0000166 . 1/2 scr back 1/2 scr fwd 1/2 scr fwd
167 = 1/2 scr back 1/2 scr fwd current line
Bram Moolenaar071d4272004-06-13 20:20:40 +0000168
169 Specifying no mark at all is the same as "+".
170 If the mark is "=", a line of dashes is printed
171 around the current line.
172
Bram Moolenaar4466ad62020-11-21 13:16:30 +0100173:[range]z#[+-^.=][count] *:z#*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000174 Like ":z", but number the lines.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000175
176 *:=*
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000177:= [flags] Print the last line number.
178 See |ex-flags| for [flags].
Bram Moolenaar071d4272004-06-13 20:20:40 +0000179
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000180:{range}= [flags] Prints the last line number in {range}. For example,
Bram Moolenaar071d4272004-06-13 20:20:40 +0000181 this prints the current line number: >
182 :.=
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000183< See |ex-flags| for [flags].
Bram Moolenaar071d4272004-06-13 20:20:40 +0000184
185:norm[al][!] {commands} *:norm* *:normal*
186 Execute Normal mode commands {commands}. This makes
187 it possible to execute Normal mode commands typed on
Bram Moolenaar4a748032010-09-30 21:47:56 +0200188 the command-line. {commands} are executed like they
189 are typed. For undo all commands are undone together.
Bram Moolenaarc81e5e72007-05-05 18:24:42 +0000190 Execution stops when an error is encountered.
Bram Moolenaara3e6bc92013-01-30 14:18:00 +0100191
Bram Moolenaar071d4272004-06-13 20:20:40 +0000192 If the [!] is given, mappings will not be used.
Bram Moolenaara3e6bc92013-01-30 14:18:00 +0100193 Without it, when this command is called from a
194 non-remappable mapping (|:noremap|), the argument can
195 be mapped anyway.
196
Bram Moolenaar071d4272004-06-13 20:20:40 +0000197 {commands} should be a complete command. If
198 {commands} does not finish a command, the last one
199 will be aborted as if <Esc> or <C-C> was typed.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000200 This implies that an insert command must be completed
201 (to start Insert mode, see |:startinsert|). A ":"
Bram Moolenaar7c626922005-02-07 22:01:03 +0000202 command must be completed as well. And you can't use
203 "Q" or "gQ" to start Ex mode.
Bram Moolenaara3e6bc92013-01-30 14:18:00 +0100204
205 The display is not updated while ":normal" is busy.
206
Bram Moolenaar8f3f58f2010-01-06 20:52:26 +0100207 {commands} cannot start with a space. Put a count of
208 1 (one) before it, "1 " is one space.
Bram Moolenaara3e6bc92013-01-30 14:18:00 +0100209
Bram Moolenaar071d4272004-06-13 20:20:40 +0000210 The 'insertmode' option is ignored for {commands}.
Bram Moolenaara3e6bc92013-01-30 14:18:00 +0100211
Bram Moolenaar071d4272004-06-13 20:20:40 +0000212 This command cannot be followed by another command,
213 since any '|' is considered part of the command.
Bram Moolenaara3e6bc92013-01-30 14:18:00 +0100214
Bram Moolenaar071d4272004-06-13 20:20:40 +0000215 This command can be used recursively, but the depth is
216 limited by 'maxmapdepth'.
Bram Moolenaara3e6bc92013-01-30 14:18:00 +0100217
Bram Moolenaar071d4272004-06-13 20:20:40 +0000218 An alternative is to use |:execute|, which uses an
219 expression as argument. This allows the use of
Bram Moolenaar46f9d492010-06-12 20:18:19 +0200220 printable characters to represent special characters.
Bram Moolenaara3e6bc92013-01-30 14:18:00 +0100221
Bram Moolenaar46f9d492010-06-12 20:18:19 +0200222 Example: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000223 :exe "normal \<c-w>\<c-w>"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000224
225:{range}norm[al][!] {commands} *:normal-range*
226 Execute Normal mode commands {commands} for each line
227 in the {range}. Before executing the {commands}, the
228 cursor is positioned in the first column of the range,
229 for each line. Otherwise it's the same as the
230 ":normal" command without a range.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000231
232 *:sh* *:shell* *E371*
233:sh[ell] This command starts a shell. When the shell exits
234 (after the "exit" command) you return to Vim. The
235 name for the shell command comes from 'shell' option.
236 *E360*
237 Note: This doesn't work when Vim on the Amiga was
238 started in QuickFix mode from a compiler, because the
239 compiler will have set stdin to a non-interactive
240 mode.
241
242 *:!cmd* *:!* *E34*
243:!{cmd} Execute {cmd} with the shell. See also the 'shell'
244 and 'shelltype' option.
Bram Moolenaar7e38ea22014-04-05 22:55:53 +0200245
Bram Moolenaar071d4272004-06-13 20:20:40 +0000246 Any '!' in {cmd} is replaced with the previous
247 external command (see also 'cpoptions'). But not when
248 there is a backslash before the '!', then that
249 backslash is removed. Example: ":!ls" followed by
250 ":!echo ! \! \\!" executes "echo ls ! \!".
Bram Moolenaar7e38ea22014-04-05 22:55:53 +0200251
Bram Moolenaar8c8de832008-06-24 22:58:06 +0000252 A '|' in {cmd} is passed to the shell, you cannot use
253 it to append a Vim command. See |:bar|.
Bram Moolenaar7e38ea22014-04-05 22:55:53 +0200254
255 If {cmd} contains "%" it is expanded to the current
Bram Moolenaaracc22402020-06-07 21:07:18 +0200256 file name, "#" is expanded to the alternate file name.
257 Special characters in the file name are not escaped,
258 use quotes to avoid their special meaning: >
Bram Moolenaar7e38ea22014-04-05 22:55:53 +0200259 :!ls "%"
Bram Moolenaaracc22402020-06-07 21:07:18 +0200260< If the file name contains a "$" then single quotes
261 might work better, but this only works if the file
262 name does not contain a single quote: >
Bram Moolenaar7e38ea22014-04-05 22:55:53 +0200263 :!ls '%'
264< This should always work, but it's more typing: >
265 :exe "!ls " . shellescape(expand("%"))
Bram Moolenaaracc22402020-06-07 21:07:18 +0200266< To get a literal "%" or "#" prepend it with a
267 backslash. For example, to list all files starting
268 with "%": >
269 :!ls \%*
Bram Moolenaar7e38ea22014-04-05 22:55:53 +0200270<
Bram Moolenaar071d4272004-06-13 20:20:40 +0000271 A newline character ends {cmd}, what follows is
272 interpreted as a following ":" command. However, if
273 there is a backslash before the newline it is removed
274 and {cmd} continues. It doesn't matter how many
275 backslashes are before the newline, only one is
276 removed.
Bram Moolenaar7e38ea22014-04-05 22:55:53 +0200277
Bram Moolenaar071d4272004-06-13 20:20:40 +0000278 On Unix the command normally runs in a non-interactive
279 shell. If you want an interactive shell to be used
280 (to use aliases) set 'shellcmdflag' to "-ic".
281 For Win32 also see |:!start|.
Bram Moolenaar7e38ea22014-04-05 22:55:53 +0200282
Bram Moolenaare968e362014-05-13 20:23:24 +0200283 After the command has been executed, the timestamp and
284 size of the current file is checked |timestamp|.
Bram Moolenaar7e38ea22014-04-05 22:55:53 +0200285
Bram Moolenaar071d4272004-06-13 20:20:40 +0000286 Vim redraws the screen after the command is finished,
287 because it may have printed any text. This requires a
288 hit-enter prompt, so that you can read any messages.
289 To avoid this use: >
290 :silent !{cmd}
291< The screen is not redrawn then, thus you have to use
292 CTRL-L or ":redraw!" if the command did display
293 something.
294 Also see |shell-window|.
295
296 *:!!*
297:!! Repeat last ":!{cmd}".
298
Bram Moolenaar61da1bf2019-06-06 12:14:49 +0200299 *:ve* *:ver* *:version*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000300:ve[rsion] Print the version number of the editor. If the
301 compiler used understands "__DATE__" the compilation
302 date is mentioned. Otherwise a fixed release-date is
303 shown.
304 The following lines contain information about which
305 features were enabled when Vim was compiled. When
306 there is a preceding '+', the feature is included,
307 when there is a '-' it is excluded. To change this,
308 you have to edit feature.h and recompile Vim.
309 To check for this in an expression, see |has()|.
310 Here is an overview of the features.
311 The first column shows the smallest version in which
312 they are included:
Bram Moolenaarb5b75622018-03-09 22:22:21 +0100313 T tiny (always)
Bram Moolenaar071d4272004-06-13 20:20:40 +0000314 S small
315 N normal
316 B big
317 H huge
318 m manually enabled or depends on other features
Bram Moolenaar4ceaa3a2019-12-03 22:49:09 +0100319 - never, feature was removed
Bram Moolenaar071d4272004-06-13 20:20:40 +0000320 (none) system dependent
321 Thus if a feature is marked with "N", it is included
322 in the normal, big and huge versions of Vim.
323
324 *+feature-list*
Bram Moolenaar7cba6c02013-09-05 22:13:31 +0200325 *+acl* |ACL| support included
Bram Moolenaar071d4272004-06-13 20:20:40 +0000326 *+ARP* Amiga only: ARP support included
327B *+arabic* |Arabic| language support
Bram Moolenaarff781552020-03-19 20:37:11 +0100328B *+autochdir* support 'autochdir' option
Bram Moolenaarb5b75622018-03-09 22:22:21 +0100329T *+autocmd* |:autocmd|, automatic commands
Bram Moolenaare42a6d22017-11-12 19:21:51 +0100330H *+autoservername* Automatically enable |clientserver|
Bram Moolenaara2a80162017-11-21 23:09:50 +0100331m *+balloon_eval* |balloon-eval| support in the GUI. Included when
332 compiling with supported GUI (Motif, GTK, GUI) and
333 either Netbeans/Sun Workshop integration or |+eval|
334 feature.
335H *+balloon_eval_term* |balloon-eval| support in the terminal,
336 'balloonevalterm'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000337N *+browse* |:browse| command
338N *+builtin_terms* some terminals builtin |builtin-terms|
339B *++builtin_terms* maximal terminals builtin |builtin-terms|
340N *+byte_offset* support for 'o' flag in 'statusline' option, "go"
341 and ":goto" commands.
Bram Moolenaar298b4402016-01-28 22:38:53 +0100342m *+channel* inter process communication |channel|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000343N *+cindent* |'cindent'|, C indenting
344N *+clientserver* Unix and Win32: Remote invocation |clientserver|
Bram Moolenaar56c860c2019-08-17 20:09:31 +0200345 *+clipboard* |clipboard| support compiled-in
346 *+clipboard_working* |clipboard| support compiled-in and working
Bram Moolenaar06fe74a2019-08-31 16:20:32 +0200347T *+cmdline_compl* command line completion |cmdline-completion|
Bram Moolenaar85388672021-01-31 17:03:52 +0100348T *+cmdline_hist* command line history |cmdline-history|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000349N *+cmdline_info* |'showcmd'| and |'ruler'|
Bram Moolenaar85388672021-01-31 17:03:52 +0100350S *+cmdwin* |cmdline-window| support
Bram Moolenaar8c96af92019-09-28 19:05:57 +0200351T *+comments* |'comments'| support
Bram Moolenaarca8c9862010-07-24 15:00:38 +0200352B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000353N *+cryptv* encryption support |encryption|
354B *+cscope* |cscope| support
Bram Moolenaarb5b75622018-03-09 22:22:21 +0100355T *+cursorbind* |'cursorbind'| support
Bram Moolenaarac6e65f2005-08-29 22:25:38 +0000356m *+cursorshape* |termcap-cursor-shape| support
357m *+debug* Compiled for debugging.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000358N *+dialog_gui* Support for |:confirm| with GUI dialog.
359N *+dialog_con* Support for |:confirm| with console dialog.
360N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog.
361N *+diff* |vimdiff| and 'diff'
362N *+digraphs* |digraphs| *E196*
Bram Moolenaar43cb6262018-03-14 21:39:02 +0100363 *+directx* Win32 GUI only: DirectX and |'renderoptions'|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000364 *+dnd* Support for DnD into the "~ register |quote_~|.
365B *+emacs_tags* |emacs-tags| files
366N *+eval* expression evaluation |eval.txt|
Bram Moolenaar5e9b2fa2016-02-01 22:37:05 +0100367N *+ex_extra* always on now, used to be for Vim's extra Ex commands
Bram Moolenaar071d4272004-06-13 20:20:40 +0000368N *+extra_search* |'hlsearch'| and |'incsearch'| options.
Bram Moolenaar4ceaa3a2019-12-03 22:49:09 +0100369- *+farsi* Removed: |farsi| language
Bram Moolenaar071d4272004-06-13 20:20:40 +0000370N *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>|
371N *+find_in_path* include file searches: |[I|, |:isearch|,
372 |CTRL-W_CTRL-I|, |:checkpath|, etc.
373N *+folding* |folding|
374 *+footer* |gui-footer|
375 *+fork* Unix only: |fork| shell commands
Bram Moolenaar8c8de832008-06-24 22:58:06 +0000376 *+float* Floating point support
Bram Moolenaar071d4272004-06-13 20:20:40 +0000377N *+gettext* message translations |multi-lang|
378 *+GUI_Athena* Unix only: Athena |GUI|
379 *+GUI_neXtaw* Unix only: neXtaw |GUI|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000380 *+GUI_GTK* Unix only: GTK+ |GUI|
381 *+GUI_Motif* Unix only: Motif |GUI|
382 *+GUI_Photon* QNX only: Photon |GUI|
383m *+hangul_input* Hangul input support |hangul|
Bram Moolenaara5792f52005-11-23 21:25:05 +0000384 *+iconv* Compiled with the |iconv()| function
385 *+iconv/dyn* Likewise |iconv-dynamic| |/dyn|
Bram Moolenaar06fe74a2019-08-31 16:20:32 +0200386T *+insert_expand* |insert_expand| Insert mode completion
Bram Moolenaarbfe13cc2020-04-12 17:53:12 +0200387m *+ipv6* Support for IPv6 networking |channel|
Bram Moolenaar38a55632016-02-15 22:07:32 +0100388m *+job* starting and stopping jobs |job|
Bram Moolenaar37c64c72017-09-19 22:06:03 +0200389S *+jumplist* |jumplist|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000390B *+keymap* |'keymap'|
Bram Moolenaarbc8801c2016-08-02 21:04:33 +0200391N *+lambda* |lambda| and |closure|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000392B *+langmap* |'langmap'|
393N *+libcall* |libcall()|
394N *+linebreak* |'linebreak'|, |'breakat'| and |'showbreak'|
395N *+lispindent* |'lisp'|
Bram Moolenaar0c72fe42018-03-29 16:04:08 +0200396T *+listcmds* Vim commands for the list of buffers |buffer-hidden|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000397 and argument list |:argdelete|
Bram Moolenaar088e8e32019-08-08 22:15:18 +0200398T *+localmap* Support for mappings local to a buffer |:map-local|
Bram Moolenaar0ba04292010-07-14 23:23:17 +0200399m *+lua* |Lua| interface
400m *+lua/dyn* |Lua| interface |/dyn|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000401N *+menu* |:menu|
402N *+mksession* |:mksession|
Bram Moolenaar30e9b3c2019-09-07 16:24:12 +0200403T *+modify_fname* |filename-modifiers|
Bram Moolenaar96f45c02019-10-26 19:53:45 +0200404T *+mouse* Mouse handling |mouse-using|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000405N *+mouseshape* |'mouseshape'|
406B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse|
407N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse|
Bram Moolenaar13600302014-05-22 18:26:40 +0200408N *+mouse_jsbterm* JSB mouse handling |jsbterm-mouse|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000409B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse|
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100410N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal|
Bram Moolenaar8c8de832008-06-24 22:58:06 +0000411N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|
Bram Moolenaar9b451252012-08-15 17:43:31 +0200412B *+mouse_sgr* Unix only: sgr mouse handling |sgr-mouse|
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100413B *+mouse_urxvt* Unix only: urxvt mouse handling |urxvt-mouse|
414N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse|
Bram Moolenaar98a29d02021-01-18 19:55:44 +0100415T *+multi_byte* Unicode support, 16 and 32 bit characters |multibyte|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000416 *+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100417N *+multi_lang* non-English language support |multi-lang|
Bram Moolenaar325b7a22004-07-05 15:58:32 +0000418m *+mzscheme* Mzscheme interface |mzscheme|
Bram Moolenaar4770d092006-01-12 23:22:24 +0000419m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000420m *+netbeans_intg* |netbeans|
Bram Moolenaarf9706e92020-02-22 14:27:04 +0100421 *+num64* 64-bit Number support |Number|
422 Always enabled since 8.2.0271, use v:numbersize to
423 check the actual size of a Number.
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100424m *+ole* Win32 GUI only: |ole-interface|
Bram Moolenaar91c49372016-05-08 09:50:29 +0200425N *+packages* Loading |packages|
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100426N *+path_extra* Up/downwards search in 'path' and 'tags'
Bram Moolenaara5792f52005-11-23 21:25:05 +0000427m *+perl* Perl interface |perl|
428m *+perl/dyn* Perl interface |perl-dynamic| |/dyn|
Bram Moolenaar7fc0c062010-08-10 21:43:35 +0200429N *+persistent_undo* Persistent undo |undo-persistence|
Bram Moolenaar4ceaa3a2019-12-03 22:49:09 +0100430N *+popupwin* Popup windows |popup-window|
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100431 *+postscript* |:hardcopy| writes a PostScript file
Bram Moolenaar071d4272004-06-13 20:20:40 +0000432N *+printer* |:hardcopy| command
Bram Moolenaar19a09a12005-03-04 23:39:37 +0000433H *+profile* |:profile| command
Bram Moolenaar60aad972010-07-21 20:36:22 +0200434m *+python* Python 2 interface |python|
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100435m *+python/dyn* Python 2 interface |python-dynamic| |/dyn|
Bram Moolenaar60aad972010-07-21 20:36:22 +0200436m *+python3* Python 3 interface |python|
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100437m *+python3/dyn* Python 3 interface |python-dynamic| |/dyn|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000438N *+quickfix* |:make| and |quickfix| commands
Bram Moolenaar8c8de832008-06-24 22:58:06 +0000439N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout,
440 'redrawtime' option
Bram Moolenaar071d4272004-06-13 20:20:40 +0000441B *+rightleft* Right to left typing |'rightleft'|
Bram Moolenaara5792f52005-11-23 21:25:05 +0000442m *+ruby* Ruby interface |ruby|
443m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
Bram Moolenaar98ef2332018-03-18 14:44:37 +0100444T *+scrollbind* |'scrollbind'|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000445B *+signs* |:sign|
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100446N *+smartindent* |'smartindent'|
Christian Brabandtf573c6e2021-06-20 14:02:16 +0200447B *+sodium* compiled with libsodium for better encryption support
Bram Moolenaar12ee7ff2019-06-10 22:47:40 +0200448B *+sound* |sound_playevent()|, |sound_playfile()| functions, etc.
449N *+spell* spell checking support, see |spell|
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100450N *+startuptime* |--startuptime| argument
451N *+statusline* Options 'statusline', 'rulerformat' and special
Bram Moolenaar071d4272004-06-13 20:20:40 +0000452 formats of 'titlestring' and 'iconstring'
Bram Moolenaar4ceaa3a2019-12-03 22:49:09 +0100453- *+sun_workshop* Removed: |workshop|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000454N *+syntax* Syntax highlighting |syntax|
455 *+system()* Unix only: opposite of |+fork|
Bram Moolenaar64d8e252016-09-06 22:12:34 +0200456T *+tag_binary* binary searching in tags file |tag-binary-search|
Bram Moolenaar4ceaa3a2019-12-03 22:49:09 +0100457- *+tag_old_static* Removed; method for static tags |tag-old-static|
458- *+tag_any_white* Removed; was to allow any white space in tags files
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100459m *+tcl* Tcl interface |tcl|
Bram Moolenaara5792f52005-11-23 21:25:05 +0000460m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn|
Bram Moolenaar1ccd8ff2017-08-11 19:50:37 +0200461m *+terminal* Support for terminal window |terminal|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000462 *+terminfo* uses |terminfo| instead of termcap
463N *+termresponse* support for |t_RV| and |v:termresponse|
Bram Moolenaar61be73b2016-04-29 22:59:22 +0200464B *+termguicolors* 24-bit color in xterm-compatible terminals support
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100465N *+textobjects* |text-objects| selection
Bram Moolenaar9d87a372018-12-18 21:41:50 +0100466N *+textprop* |text-properties|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000467 *+tgetent* non-Unix only: able to use external termcap
Bram Moolenaare18c0b32016-03-20 21:08:34 +0100468N *+timers* the |timer_start()| function
Bram Moolenaarc81e5e72007-05-05 18:24:42 +0000469N *+title* Setting the window 'title' and 'icon'
Bram Moolenaar071d4272004-06-13 20:20:40 +0000470N *+toolbar* |gui-toolbar|
Bram Moolenaarac9fb182019-04-27 13:04:13 +0200471T *+user_commands* User-defined commands. |user-commands|
472 Always enabled since 8.1.1210.
Bram Moolenaar04958cb2018-06-23 19:23:02 +0200473B *+vartabs* Variable-width tabstops. |'vartabstop'|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000474N *+viminfo* |'viminfo'|
Bram Moolenaar37c64c72017-09-19 22:06:03 +0200475 *+vertsplit* Vertically split windows |:vsplit|; Always enabled
476 since 8.0.1118.
Bram Moolenaar6c6be9e2020-06-12 20:19:44 +0200477N *+virtualedit* |'virtualedit'| Always enabled since 8.1.826.
Bram Moolenaar870ba5f2019-01-11 14:37:20 +0100478T *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.
479T *+visualextra* extra Visual mode commands |blockwise-operators|
Bram Moolenaar1f0bfe52018-07-29 16:09:22 +0200480T *+vreplace* |gR| and |gr|
Bram Moolenaar22f1d0e2018-02-27 14:53:30 +0100481 *+vtp* on MS-Windows console: support for 'termguicolors'
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100482N *+wildignore* |'wildignore'|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000483N *+wildmenu* |'wildmenu'|
Bram Moolenaar870ba5f2019-01-11 14:37:20 +0100484T *+windows* more than one window; Always enabled since 8.0.1118.
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100485m *+writebackup* |'writebackup'| is default on
486m *+xim* X input method |xim|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000487 *+xfontset* X fontset support |xfontset|
Bram Moolenaar7cba6c02013-09-05 22:13:31 +0200488 *+xpm* pixmap support
Bram Moolenaar9b451252012-08-15 17:43:31 +0200489m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000490 *+xsmp* XSMP (X session management) support
491 *+xsmp_interact* interactive XSMP (X session management) support
492N *+xterm_clipboard* Unix only: xterm clipboard handling
Bram Moolenaar34feacb2012-12-05 19:01:43 +0100493m *+xterm_save* save and restore xterm screen |xterm-screens|
494N *+X11* Unix only: can restore window title |X11|
Bram Moolenaar071d4272004-06-13 20:20:40 +0000495
496 */dyn* *E370* *E448*
497 To some of the features "/dyn" is added when the
498 feature is only available when the related library can
499 be dynamically loaded.
500
501:ve[rsion] {nr} Is now ignored. This was previously used to check the
502 version number of a .vimrc file. It was removed,
503 because you can now use the ":if" command for
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200504 version-dependent behavior.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000505
506 *:redi* *:redir*
507:redi[r][!] > {file} Redirect messages to file {file}. The messages which
508 are the output of commands are written to that file,
509 until redirection ends. The messages are also still
510 shown on the screen. When [!] is included, an
511 existing file is overwritten. When [!] is omitted,
512 and {file} exists, this command fails.
Bram Moolenaar063b9d12016-07-09 20:21:48 +0200513
Bram Moolenaar071d4272004-06-13 20:20:40 +0000514 Only one ":redir" can be active at a time. Calls to
515 ":redir" will close any active redirection before
Bram Moolenaar063b9d12016-07-09 20:21:48 +0200516 starting redirection to the new target. For recursive
517 use check out |execute()|.
518
Bram Moolenaar071d4272004-06-13 20:20:40 +0000519 To stop the messages and commands from being echoed to
520 the screen, put the commands in a function and call it
521 with ":silent call Function()".
Bram Moolenaar54ee7752005-05-31 22:22:17 +0000522 An alternative is to use the 'verbosefile' option,
523 this can be used in combination with ":redir".
Bram Moolenaar071d4272004-06-13 20:20:40 +0000524
525:redi[r] >> {file} Redirect messages to file {file}. Append if {file}
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200526 already exists.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000527
Bram Moolenaar8c8de832008-06-24 22:58:06 +0000528:redi[r] @{a-zA-Z}
Bram Moolenaar6c0b44b2005-06-01 21:56:33 +0000529:redi[r] @{a-zA-Z}> Redirect messages to register {a-z}. Append to the
Bram Moolenaar071d4272004-06-13 20:20:40 +0000530 contents of the register if its name is given
Bram Moolenaar8c8de832008-06-24 22:58:06 +0000531 uppercase {A-Z}. The ">" after the register name is
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200532 optional.
533:redi[r] @{a-z}>> Append messages to register {a-z}.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000534
Bram Moolenaar664f3cf2019-12-07 16:03:51 +0100535:redi[r] @*>
Bram Moolenaarc81e5e72007-05-05 18:24:42 +0000536:redi[r] @+> Redirect messages to the selection or clipboard. For
537 backward compatibility, the ">" after the register
538 name can be omitted. See |quotestar| and |quoteplus|.
Bram Moolenaar664f3cf2019-12-07 16:03:51 +0100539:redi[r] @*>>
Bram Moolenaarc81e5e72007-05-05 18:24:42 +0000540:redi[r] @+>> Append messages to the selection or clipboard.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000541
Bram Moolenaar6c0b44b2005-06-01 21:56:33 +0000542:redi[r] @"> Redirect messages to the unnamed register. For
543 backward compatibility, the ">" after the register
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200544 name can be omitted.
545:redi[r] @">> Append messages to the unnamed register.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000546
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000547:redi[r] => {var} Redirect messages to a variable. If the variable
548 doesn't exist, then it is created. If the variable
549 exists, then it is initialized to an empty string.
Bram Moolenaarc81e5e72007-05-05 18:24:42 +0000550 The variable will remain empty until redirection ends.
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000551 Only string variables can be used. After the
552 redirection starts, if the variable is removed or
553 locked or the variable type is changed, then further
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200554 command output messages will cause errors.
Bram Moolenaar063b9d12016-07-09 20:21:48 +0200555 To get the output of one command the |execute()|
Bram Moolenaar2c7f8c52020-04-20 19:52:53 +0200556 function can be used instead of redirection.
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000557
558:redi[r] =>> {var} Append messages to an existing variable. Only string
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200559 variables can be used.
Bram Moolenaar5313dcb2005-02-22 08:56:13 +0000560
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200561:redi[r] END End redirecting messages.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000562
Bram Moolenaar7b668e82016-08-23 23:51:21 +0200563 *:filt* *:filter*
Bram Moolenaar214641f2017-03-05 17:04:09 +0100564:filt[er][!] {pat} {command}
565:filt[er][!] /{pat}/ {command}
566 Restrict the output of {command} to lines matching
567 with {pat}. For example, to list only xml files: >
Bram Moolenaar818078d2016-08-27 21:58:42 +0200568 :filter /\.xml$/ oldfiles
Bram Moolenaar214641f2017-03-05 17:04:09 +0100569< If the [!] is given, restrict the output of {command}
570 to lines that do NOT match {pat}.
571
Bram Moolenaar7b668e82016-08-23 23:51:21 +0200572 {pat} is a Vim search pattern. Instead of enclosing
573 it in / any non-ID character (see |'isident'|) can be
574 used, so long as it does not appear in {pat}. Without
575 the enclosing character the pattern cannot include the
Bram Moolenaarc8cdf0f2021-03-13 13:28:13 +0100576 bar character. 'ignorecase' is not used.
Bram Moolenaar7b668e82016-08-23 23:51:21 +0200577
578 The pattern is matched against the relevant part of
579 the output, not necessarily the whole line. Only some
580 commands support filtering, try it out to check if it
Bram Moolenaarf86db782018-10-25 13:31:37 +0200581 works. Some of the commands that support filtering:
Bram Moolenaarad6dc492019-04-27 22:40:08 +0200582 |:#| - filter whole line
583 |:clist| - filter by file name or module name
584 |:command| - filter by command name
585 |:files| - filter by file name
586 |:highlight| - filter by highlight group
587 |:jumps| - filter by file name
588 |:let| - filter by variable name
589 |:list| - filter whole line
590 |:llist| - filter by file name or module name
591 |:marks| - filter by text in the current file,
592 or file name for other files
593 |:oldfiles| - filter by file name
Bram Moolenaar8fc42962019-10-26 17:33:13 +0200594 |:registers| - filter by register contents
595 (does not work multi-line)
Bram Moolenaarad6dc492019-04-27 22:40:08 +0200596 |:set| - filter by variable name
Bram Moolenaar7b668e82016-08-23 23:51:21 +0200597
598 Only normal messages are filtered, error messages are
599 not.
600
Bram Moolenaare0fa3742016-02-20 15:47:01 +0100601 *:sil* *:silent* *:silent!*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000602:sil[ent][!] {command} Execute {command} silently. Normal messages will not
603 be given or added to the message history.
604 When [!] is added, error messages will also be
605 skipped, and commands and mappings will not be aborted
606 when an error is detected. |v:errmsg| is still set.
607 When [!] is not used, an error message will cause
608 further messages to be displayed normally.
609 Redirection, started with |:redir|, will continue as
610 usual, although there might be small differences.
611 This will allow redirecting the output of a command
612 without seeing it on the screen. Example: >
613 :redir >/tmp/foobar
614 :silent g/Aap/p
615 :redir END
616< To execute a Normal mode command silently, use the
617 |:normal| command. For example, to search for a
618 string without messages: >
619 :silent exe "normal /path\<CR>"
620< ":silent!" is useful to execute a command that may
621 fail, but the failure is to be ignored. Example: >
622 :let v:errmsg = ""
623 :silent! /^begin
624 :if v:errmsg != ""
625 : ... pattern was not found
626< ":silent" will also avoid the hit-enter prompt. When
627 using this for an external command, this may cause the
628 screen to be messed up. Use |CTRL-L| to clean it up
629 then.
630 ":silent menu ..." defines a menu that will not echo a
631 Command-line command. The command will still produce
632 messages though. Use ":silent" in the command itself
633 to avoid that: ":silent menu .... :silent command".
634
Bram Moolenaar8e258a42009-07-09 13:55:43 +0000635 *:uns* *:unsilent*
636:uns[ilent] {command} Execute {command} not silently. Only makes a
637 difference when |:silent| was used to get to this
638 command.
639 Use this for giving a message even when |:silent| was
640 used. In this example |:silent| is used to avoid the
641 message about reading the file and |:unsilent| to be
642 able to list the first line of each file. >
643 :silent argdo unsilent echo expand('%') . ": " . getline(1)
644<
645
Bram Moolenaar071d4272004-06-13 20:20:40 +0000646 *:verb* *:verbose*
647:[count]verb[ose] {command}
648 Execute {command} with 'verbose' set to [count]. If
Bram Moolenaared203462004-06-16 11:19:22 +0000649 [count] is omitted one is used. ":0verbose" can be
650 used to set 'verbose' to zero.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000651 The additional use of ":silent" makes messages
652 generated but not displayed.
653 The combination of ":silent" and ":verbose" can be
654 used to generate messages and check them with
655 |v:statusmsg| and friends. For example: >
656 :let v:statusmsg = ""
657 :silent verbose runtime foobar.vim
658 :if v:statusmsg != ""
659 : " foobar.vim could not be found
660 :endif
661< When concatenating another command, the ":verbose"
662 only applies to the first one: >
663 :4verbose set verbose | set verbose
664< verbose=4 ~
665 verbose=0 ~
Bram Moolenaar54ee7752005-05-31 22:22:17 +0000666 For logging verbose messages in a file use the
667 'verbosefile' option.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000668
Bram Moolenaar8aff23a2005-08-19 20:40:30 +0000669 *:verbose-cmd*
670When 'verbose' is non-zero, listing the value of a Vim option or a key map or
Bram Moolenaare344bea2005-09-01 20:46:49 +0000671an abbreviation or a user-defined function or a command or a highlight group
672or an autocommand will also display where it was last defined. If it was
673defined manually then there will be no "Last set" message. When it was
674defined while executing a function, user command or autocommand, the script in
675which it was defined is reported.
Bram Moolenaardb84e452010-08-15 13:50:43 +0200676{not available when compiled without the |+eval| feature}
Bram Moolenaar8aff23a2005-08-19 20:40:30 +0000677
Bram Moolenaar071d4272004-06-13 20:20:40 +0000678 *K*
679K Run a program to lookup the keyword under the
680 cursor. The name of the program is given with the
681 'keywordprg' (kp) option (default is "man"). The
682 keyword is formed of letters, numbers and the
683 characters in 'iskeyword'. The keyword under or
684 right of the cursor is used. The same can be done
685 with the command >
686 :!{program} {keyword}
687< There is an example of a program to use in the tools
Bram Moolenaar214641f2017-03-05 17:04:09 +0100688 directory of Vim. It is called "ref" and does a
Bram Moolenaar071d4272004-06-13 20:20:40 +0000689 simple spelling check.
690 Special cases:
Bram Moolenaar26852122016-05-24 20:02:38 +0200691 - If 'keywordprg' begins with ":" it is invoked as
692 a Vim Ex command with [count].
Bram Moolenaar071d4272004-06-13 20:20:40 +0000693 - If 'keywordprg' is empty, the ":help" command is
694 used. It's a good idea to include more characters
695 in 'iskeyword' then, to be able to find more help.
Bram Moolenaar26852122016-05-24 20:02:38 +0200696 - When 'keywordprg' is equal to "man" or starts with
697 ":", a [count] before "K" is inserted after
698 keywordprg and before the keyword. For example,
699 using "2K" while the cursor is on "mkdir", results
700 in: >
Bram Moolenaar071d4272004-06-13 20:20:40 +0000701 !man 2 mkdir
702< - When 'keywordprg' is equal to "man -s", a count
703 before "K" is inserted after the "-s". If there is
704 no count, the "-s" is removed.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000705
706 *v_K*
707{Visual}K Like "K", but use the visually highlighted text for
708 the keyword. Only works when the highlighted text is
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200709 not more than one line.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000710
711[N]gs *gs* *:sl* *:sleep*
Bram Moolenaare2edc2e2021-01-16 20:21:23 +0100712:[N]sl[eep] [N][m] Do nothing for [N] seconds. When [m] is included,
Bram Moolenaar13fcaaf2005-04-15 21:13:42 +0000713 sleep for [N] milliseconds. The count for "gs" always
Bram Moolenaar071d4272004-06-13 20:20:40 +0000714 uses seconds. The default is one second. >
715 :sleep "sleep for one second
716 :5sleep "sleep for five seconds
Bram Moolenaare2edc2e2021-01-16 20:21:23 +0100717 :sleep 100m "sleep for 100 milliseconds
Bram Moolenaar071d4272004-06-13 20:20:40 +0000718 10gs "sleep for ten seconds
Bram Moolenaar5666fcd2019-12-26 14:35:26 +0100719< Can be interrupted with CTRL-C (CTRL-Break on
720 MS-Windows). "gs" stands for "goto sleep".
Bram Moolenaar677ee682005-01-27 14:41:15 +0000721 While sleeping the cursor is positioned in the text,
Bram Moolenaar25c9c682019-05-05 18:13:34 +0200722 if at a visible position.
Bram Moolenaar15146672011-10-20 22:22:38 +0200723 Also process the received netbeans messages. {only
724 available when compiled with the |+netbeans_intg|
725 feature}
726
Bram Moolenaar98a29d02021-01-18 19:55:44 +0100727 *:sl!* *:sleep!*
Bram Moolenaar2346a632021-06-13 19:02:49 +0200728:[N]sl[eep]! [N][m] Same as above, but hide the cursor.
Bram Moolenaar98a29d02021-01-18 19:55:44 +0100729
Bram Moolenaard4aa83a2019-05-09 18:59:31 +0200730 *:xrestore* *:xr*
731:xr[estore] [display] Reinitializes the connection to the X11 server. Useful
732 after the X server restarts, e.g. when running Vim for
733 long time inside screen/tmux and connecting from
Bram Moolenaar68e65602019-05-26 21:33:31 +0200734 different machines.
Bram Moolenaar664f3cf2019-12-07 16:03:51 +0100735 [display] should be in the format of the $DISPLAY
Bram Moolenaard4aa83a2019-05-09 18:59:31 +0200736 environment variable (e.g. "localhost:10.0")
737 If [display] is omitted, then it reinitializes the
738 connection to the X11 server using the same value as
739 was used for the previous execution of this command.
740 If the value was never specified, then it uses the
741 value of $DISPLAY environment variable as it was when
742 Vim was started.
Bram Moolenaar664f3cf2019-12-07 16:03:51 +0100743 {only available when compiled with the |+clipboard|
Bram Moolenaard4aa83a2019-05-09 18:59:31 +0200744 feature}
Bram Moolenaar071d4272004-06-13 20:20:40 +0000745
746 *g_CTRL-A*
747g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
748 (which is very rare): print memory usage statistics.
749 Only useful for debugging Vim.
Bram Moolenaar345efa02016-01-15 20:57:49 +0100750 For incrementing in Visual mode see |v_g_CTRL-A|.
Bram Moolenaar071d4272004-06-13 20:20:40 +0000751
752==============================================================================
Bram Moolenaar24ea3ba2010-09-19 19:01:21 +02007532. Using Vim like less or more *less*
Bram Moolenaar071d4272004-06-13 20:20:40 +0000754
755If you use the less or more program to view a file, you don't get syntax
756highlighting. Thus you would like to use Vim instead. You can do this by
757using the shell script "$VIMRUNTIME/macros/less.sh".
758
759This shell script uses the Vim script "$VIMRUNTIME/macros/less.vim". It sets
760up mappings to simulate the commands that less supports. Otherwise, you can
761still use the Vim commands.
762
763This isn't perfect. For example, when viewing a short file Vim will still use
Bram Moolenaar7ff78462020-07-10 22:00:53 +0200764the whole screen. But it works well enough for most uses, and you get syntax
Bram Moolenaar071d4272004-06-13 20:20:40 +0000765highlighting.
766
767The "h" key will give you a short overview of the available commands.
768
Bram Moolenaare392eb42015-11-19 20:38:09 +0100769If you want to set options differently when using less, define the
770LessInitFunc in your vimrc, for example: >
771
772 func LessInitFunc()
773 set nocursorcolumn nocursorline
774 endfunc
775<
776
Bram Moolenaard2855f52018-07-31 22:23:58 +0200777 vim:tw=78:ts=8:noet:ft=help:norl: