Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 642 lines (582 sloc) 26.335 kb
7b671a2 Update runtime files.
Bram Moolenaar authored
1 *various.txt* For Vim version 7.3. Last change: 2012 Aug 03
e5c6ef7 updated for version 7.0001
vimboss authored
2
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6
7 Various commands *various*
8
9 1. Various commands |various-cmds|
2548b4d Move text from various.txt to a new helphelp.txt help file.
Bram Moolenaar authored
10 2. Using Vim like less or more |less|
e5c6ef7 updated for version 7.0001
vimboss authored
11
12 ==============================================================================
13 1. Various commands *various-cmds*
14
15 *CTRL-L*
40daf33 updated for version 7.0090
vimboss authored
16 CTRL-L Clear and redraw the screen. The redraw may happen
17 later, after processing typeahead.
e5c6ef7 updated for version 7.0001
vimboss authored
18
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
33 *N<Del>*
34 <Del> When entering a number: Remove the last digit.
35 Note: if you like to use <BS> for this, add this
36 mapping to your .vimrc: >
37 :map CTRL-V <BS> CTRL-V <Del>
38 < See |:fixdel| if your <Del> key does not do what you
39 want.
40
41 :as[cii] or *ga* *:as* *:ascii*
42 ga Print the ascii value of the character under the
43 cursor in decimal, hexadecimal and octal. For
44 example, when the cursor is on a 'R':
45 <R> 82, Hex 52, Octal 122 ~
46 When the character is a non-standard ASCII character,
47 but printable according to the 'isprint' option, the
48 non-printable version is also given. When the
49 character is larger than 127, the <M-x> form is also
50 printed. For example:
51 <~A> <M-^A> 129, Hex 81, Octal 201 ~
52 <p> <|~> <M-~> 254, Hex fe, Octal 376 ~
53 (where <p> is a special character)
54 The <Nul> character in a file is stored internally as
55 <NL>, but it will be shown as:
56 <^@> 0, Hex 00, Octal 000 ~
852a687 updated for version 7.0216
vimboss authored
57 If the character has composing characters these are
58 also shown. The value of 'maxcombine' doesn't matter.
e5c6ef7 updated for version 7.0001
vimboss authored
59 Mnemonic: Get Ascii value. {not in Vi}
60
61 *g8*
62 g8 Print the hex values of the bytes used in the
63 character under the cursor, assuming it is in |UTF-8|
852a687 updated for version 7.0216
vimboss authored
64 encoding. This also shows composing characters. The
65 value of 'maxcombine' doesn't matter.
66 Example of a character with two composing characters:
e5c6ef7 updated for version 7.0001
vimboss authored
67 e0 b8 81 + e0 b8 b9 + e0 b9 89 ~
04fc68a updated for version 7.0227
vimboss authored
68 {not in Vi} {only when compiled with the |+multi_byte|
69 feature}
70
71 *8g8*
72 8g8 Find an illegal UTF-8 byte sequence at or after the
73 cursor. This works in two situations:
74 1. when 'encoding' is any 8-bit encoding
75 2. when 'encoding' is "utf-8" and 'fileencoding' is
76 any 8-bit encoding
77 Thus it can be used when editing a file that was
78 supposed to be UTF-8 but was read as if it is an 8-bit
79 encoding because it contains illegal bytes.
80 Does not wrap around the end of the file.
81 Note that when the cursor is on an illegal byte or the
82 cursor is halfway a multi-byte character the command
83 won't move the cursor.
84 {not in Vi} {only when compiled with the |+multi_byte|
85 feature}
e5c6ef7 updated for version 7.0001
vimboss authored
86
2d1be1e updated for version 7.0f01
vimboss authored
87 *:p* *:pr* *:print* *E749*
883273d updated for version 7.0051
vimboss authored
88 :[range]p[rint] [flags]
89 Print [range] lines (default current line).
e5c6ef7 updated for version 7.0001
vimboss authored
90 Note: If you are looking for a way to print your text
883273d updated for version 7.0051
vimboss authored
91 on paper see |:hardcopy|. In the GUI you can use the
92 File.Print menu entry.
93 See |ex-flags| for [flags].
e5c6ef7 updated for version 7.0001
vimboss authored
94
883273d updated for version 7.0051
vimboss authored
95 :[range]p[rint] {count} [flags]
e5c6ef7 updated for version 7.0001
vimboss authored
96 Print {count} lines, starting with [range] (default
97 current line |cmdline-ranges|).
883273d updated for version 7.0051
vimboss authored
98 See |ex-flags| for [flags].
e5c6ef7 updated for version 7.0001
vimboss authored
99
100 *:P* *:Print*
883273d updated for version 7.0051
vimboss authored
101 :[range]P[rint] [count] [flags]
e5c6ef7 updated for version 7.0001
vimboss authored
102 Just as ":print". Was apparently added to Vi for
103 people that keep the shift key pressed too long...
96d7053 Updated runtime files.
Bram Moolenaar authored
104 Note: A user command can overrule this command.
883273d updated for version 7.0051
vimboss authored
105 See |ex-flags| for [flags].
e5c6ef7 updated for version 7.0001
vimboss authored
106
107 *:l* *:list*
883273d updated for version 7.0051
vimboss authored
108 :[range]l[ist] [count] [flags]
e5c6ef7 updated for version 7.0001
vimboss authored
109 Same as :print, but display unprintable characters
89146a1 Runtime file updates.
Bram Moolenaar authored
110 with '^' and put $ after the line. This can be
6a29db8 Updated runtime files and translations.
Bram Moolenaar authored
111 further changed with the 'listchars' option.
883273d updated for version 7.0051
vimboss authored
112 See |ex-flags| for [flags].
e5c6ef7 updated for version 7.0001
vimboss authored
113
114 *:nu* *:number*
883273d updated for version 7.0051
vimboss authored
115 :[range]nu[mber] [count] [flags]
e5c6ef7 updated for version 7.0001
vimboss authored
116 Same as :print, but precede each line with its line
ca3326f updated for version 7.0202
vimboss authored
117 number. (See also 'highlight' and 'numberwidth'
118 option).
883273d updated for version 7.0051
vimboss authored
119 See |ex-flags| for [flags].
e5c6ef7 updated for version 7.0001
vimboss authored
120
121 *:#*
883273d updated for version 7.0051
vimboss authored
122 :[range]# [count] [flags]
123 synonym for :number.
e5c6ef7 updated for version 7.0001
vimboss authored
124
49b03a5 updated for version 7.1a
vimboss authored
125 *:#!*
126 :#!{anything} Ignored, so that you can start a Vim script with: >
97186ba updated for version 7.2a
vimboss authored
127 #!vim -S
49b03a5 updated for version 7.1a
vimboss authored
128 echo "this is a Vim script"
129 quit
130 <
e5c6ef7 updated for version 7.0001
vimboss authored
131 *:z* *E144*
132 :{range}z[+-^.=]{count} Display several lines of text surrounding the line
133 specified with {range}, or around the current line
134 if there is no {range}. If there is a {count}, that's
c488e50 updated for version 7.0050
vimboss authored
135 how many lines you'll see; if there is only one window
49d654e Updated runtime files.
Bram Moolenaar authored
136 then twice the value of the 'scroll' option is used,
137 otherwise the current window height minus 3 is used.
e5c6ef7 updated for version 7.0001
vimboss authored
138
a99ae26 Updated runtime files.
Bram Moolenaar authored
139 If there is a {count} the 'window' option is set to
140 its value.
141
e5c6ef7 updated for version 7.0001
vimboss authored
142 :z can be used either alone or followed by any of
143 several punctuation marks. These have the following
144 effect:
145
49d654e Updated runtime files.
Bram Moolenaar authored
146 mark first line last line new cursor line ~
e5c6ef7 updated for version 7.0001
vimboss authored
147 ---- ---------- --------- ------------
148 + current line 1 scr forward 1 scr forward
149 - 1 scr back current line current line
150 ^ 2 scr back 1 scr back 1 scr back
ef870e8 updated for version 7.0048
vimboss authored
151 . 1/2 scr back 1/2 scr fwd 1/2 scr fwd
152 = 1/2 scr back 1/2 scr fwd current line
e5c6ef7 updated for version 7.0001
vimboss authored
153
154 Specifying no mark at all is the same as "+".
155 If the mark is "=", a line of dashes is printed
156 around the current line.
157
158 :{range}z#[+-^.=]{count} *:z#*
159 Like ":z", but number the lines.
160 {not in all versions of Vi, not with these arguments}
161
162 *:=*
883273d updated for version 7.0051
vimboss authored
163 := [flags] Print the last line number.
164 See |ex-flags| for [flags].
e5c6ef7 updated for version 7.0001
vimboss authored
165
883273d updated for version 7.0051
vimboss authored
166 :{range}= [flags] Prints the last line number in {range}. For example,
e5c6ef7 updated for version 7.0001
vimboss authored
167 this prints the current line number: >
168 :.=
883273d updated for version 7.0051
vimboss authored
169 < See |ex-flags| for [flags].
e5c6ef7 updated for version 7.0001
vimboss authored
170
171 :norm[al][!] {commands} *:norm* *:normal*
172 Execute Normal mode commands {commands}. This makes
173 it possible to execute Normal mode commands typed on
8d49009 Runtime file updates.
Bram Moolenaar authored
174 the command-line. {commands} are executed like they
175 are typed. For undo all commands are undone together.
49b03a5 updated for version 7.1a
vimboss authored
176 Execution stops when an error is encountered.
e5c6ef7 updated for version 7.0001
vimboss authored
177 If the [!] is given, mappings will not be used.
178 {commands} should be a complete command. If
179 {commands} does not finish a command, the last one
180 will be aborted as if <Esc> or <C-C> was typed.
181 The display isn't updated while ":normal" is busy.
182 This implies that an insert command must be completed
183 (to start Insert mode, see |:startinsert|). A ":"
6cd682d updated for version 7.0049
vimboss authored
184 command must be completed as well. And you can't use
185 "Q" or "gQ" to start Ex mode.
dee4bec Update documentation files.
Bram Moolenaar authored
186 {commands} cannot start with a space. Put a count of
187 1 (one) before it, "1 " is one space.
e5c6ef7 updated for version 7.0001
vimboss authored
188 The 'insertmode' option is ignored for {commands}.
189 This command cannot be followed by another command,
190 since any '|' is considered part of the command.
191 This command can be used recursively, but the depth is
192 limited by 'maxmapdepth'.
193 When this command is called from a non-remappable
194 mapping |:noremap|, the argument can be mapped anyway.
195 An alternative is to use |:execute|, which uses an
196 expression as argument. This allows the use of
318f787 Update help files.
Bram Moolenaar authored
197 printable characters to represent special characters.
198 Example: >
e5c6ef7 updated for version 7.0001
vimboss authored
199 :exe "normal \<c-w>\<c-w>"
200 < {not in Vi, of course}
201 {not available when the |+ex_extra| feature was
202 disabled at compile time}
203
204 :{range}norm[al][!] {commands} *:normal-range*
205 Execute Normal mode commands {commands} for each line
206 in the {range}. Before executing the {commands}, the
207 cursor is positioned in the first column of the range,
208 for each line. Otherwise it's the same as the
209 ":normal" command without a range.
210 {not in Vi}
68c020b Make the references to features in the help more consistent. (Sylvain…
Bram Moolenaar authored
211 {not available when |+ex_extra| feature was disabled
212 at compile time}
e5c6ef7 updated for version 7.0001
vimboss authored
213
214 *:sh* *:shell* *E371*
215 :sh[ell] This command starts a shell. When the shell exits
216 (after the "exit" command) you return to Vim. The
217 name for the shell command comes from 'shell' option.
218 *E360*
219 Note: This doesn't work when Vim on the Amiga was
220 started in QuickFix mode from a compiler, because the
221 compiler will have set stdin to a non-interactive
222 mode.
223
224 *:!cmd* *:!* *E34*
225 :!{cmd} Execute {cmd} with the shell. See also the 'shell'
226 and 'shelltype' option.
227 Any '!' in {cmd} is replaced with the previous
228 external command (see also 'cpoptions'). But not when
229 there is a backslash before the '!', then that
230 backslash is removed. Example: ":!ls" followed by
231 ":!echo ! \! \\!" executes "echo ls ! \!".
232 After the command has been executed, the timestamp of
233 the current file is checked |timestamp|.
97186ba updated for version 7.2a
vimboss authored
234 A '|' in {cmd} is passed to the shell, you cannot use
235 it to append a Vim command. See |:bar|.
e5c6ef7 updated for version 7.0001
vimboss authored
236 A newline character ends {cmd}, what follows is
237 interpreted as a following ":" command. However, if
238 there is a backslash before the newline it is removed
239 and {cmd} continues. It doesn't matter how many
240 backslashes are before the newline, only one is
241 removed.
242 On Unix the command normally runs in a non-interactive
243 shell. If you want an interactive shell to be used
244 (to use aliases) set 'shellcmdflag' to "-ic".
245 For Win32 also see |:!start|.
246 Vim redraws the screen after the command is finished,
247 because it may have printed any text. This requires a
248 hit-enter prompt, so that you can read any messages.
249 To avoid this use: >
250 :silent !{cmd}
251 < The screen is not redrawn then, thus you have to use
252 CTRL-L or ":redraw!" if the command did display
253 something.
254 Also see |shell-window|.
255
256 *:!!*
257 :!! Repeat last ":!{cmd}".
258
259 *:ve* *:version*
260 :ve[rsion] Print the version number of the editor. If the
261 compiler used understands "__DATE__" the compilation
262 date is mentioned. Otherwise a fixed release-date is
263 shown.
264 The following lines contain information about which
265 features were enabled when Vim was compiled. When
266 there is a preceding '+', the feature is included,
267 when there is a '-' it is excluded. To change this,
268 you have to edit feature.h and recompile Vim.
269 To check for this in an expression, see |has()|.
270 Here is an overview of the features.
271 The first column shows the smallest version in which
272 they are included:
273 T tiny
274 S small
275 N normal
276 B big
277 H huge
278 m manually enabled or depends on other features
279 (none) system dependent
280 Thus if a feature is marked with "N", it is included
281 in the normal, big and huge versions of Vim.
282
283 *+feature-list*
284 *+ARP* Amiga only: ARP support included
285 B *+arabic* |Arabic| language support
286 N *+autocmd* |:autocmd|, automatic commands
2922781 updated for version 7.0057
vimboss authored
287 m *+balloon_eval* |balloon-eval| support. Included when compiling with
288 supported GUI (Motif, GTK, GUI) and either
289 Netbeans/Sun Workshop integration or |+eval| feature.
e5c6ef7 updated for version 7.0001
vimboss authored
290 N *+browse* |:browse| command
291 N *+builtin_terms* some terminals builtin |builtin-terms|
292 B *++builtin_terms* maximal terminals builtin |builtin-terms|
293 N *+byte_offset* support for 'o' flag in 'statusline' option, "go"
294 and ":goto" commands.
295 N *+cindent* |'cindent'|, C indenting
296 N *+clientserver* Unix and Win32: Remote invocation |clientserver|
297 *+clipboard* |clipboard| support
298 N *+cmdline_compl* command line completion |cmdline-completion|
299 N *+cmdline_hist* command line history |cmdline-history|
300 N *+cmdline_info* |'showcmd'| and |'ruler'|
301 N *+comments* |'comments'| support
d68c936 Add the 'c' flag to 'concealcursor'.
Bram Moolenaar authored
302 B *+conceal* "conceal" support, see |conceal| |:syn-conceal| etc.
e5c6ef7 updated for version 7.0001
vimboss authored
303 N *+cryptv* encryption support |encryption|
304 B *+cscope* |cscope| support
01601aa Add the conceal patch from Vince Negri.
Bram Moolenaar authored
305 m *+cursorbind* |'cursorbind'| support
ffac2d4 updated for version 7.0138
vimboss authored
306 m *+cursorshape* |termcap-cursor-shape| support
307 m *+debug* Compiled for debugging.
e5c6ef7 updated for version 7.0001
vimboss authored
308 N *+dialog_gui* Support for |:confirm| with GUI dialog.
309 N *+dialog_con* Support for |:confirm| with console dialog.
310 N *+dialog_con_gui* Support for |:confirm| with GUI and console dialog.
311 N *+diff* |vimdiff| and 'diff'
312 N *+digraphs* |digraphs| *E196*
313 *+dnd* Support for DnD into the "~ register |quote_~|.
314 B *+emacs_tags* |emacs-tags| files
315 N *+eval* expression evaluation |eval.txt|
316 N *+ex_extra* Vim's extra Ex commands: |:center|, |:left|,
317 |:normal|, |:retab| and |:right|
318 N *+extra_search* |'hlsearch'| and |'incsearch'| options.
319 B *+farsi* |farsi| language
320 N *+file_in_path* |gf|, |CTRL-W_f| and |<cfile>|
321 N *+find_in_path* include file searches: |[I|, |:isearch|,
322 |CTRL-W_CTRL-I|, |:checkpath|, etc.
323 N *+folding* |folding|
324 *+footer* |gui-footer|
325 *+fork* Unix only: |fork| shell commands
97186ba updated for version 7.2a
vimboss authored
326 *+float* Floating point support
809f415 @b4winckler Docs updated on ODB support, fixed Info.plist
authored
327 m *+fullscreen* MacVim only: edit in full-screen
e5c6ef7 updated for version 7.0001
vimboss authored
328 N *+gettext* message translations |multi-lang|
329 *+GUI_Athena* Unix only: Athena |GUI|
330 *+GUI_neXtaw* Unix only: neXtaw |GUI|
331 *+GUI_GTK* Unix only: GTK+ |GUI|
332 *+GUI_Motif* Unix only: Motif |GUI|
333 *+GUI_Photon* QNX only: Photon |GUI|
334 m *+hangul_input* Hangul input support |hangul|
25162ac updated for version 7.0158
vimboss authored
335 *+iconv* Compiled with the |iconv()| function
336 *+iconv/dyn* Likewise |iconv-dynamic| |/dyn|
e5c6ef7 updated for version 7.0001
vimboss authored
337 N *+insert_expand* |insert_expand| Insert mode completion
338 N *+jumplist* |jumplist|
339 B *+keymap* |'keymap'|
340 B *+langmap* |'langmap'|
341 N *+libcall* |libcall()|
342 N *+linebreak* |'linebreak'|, |'breakat'| and |'showbreak'|
343 N *+lispindent* |'lisp'|
344 N *+listcmds* Vim commands for the list of buffers |buffer-hidden|
345 and argument list |:argdelete|
346 N *+localmap* Support for mappings local to a buffer |:map-local|
8f5008d Added Lua interfae. (Luis Carvalho)
Bram Moolenaar authored
347 m *+lua* |Lua| interface
348 m *+lua/dyn* |Lua| interface |/dyn|
e5c6ef7 updated for version 7.0001
vimboss authored
349 N *+menu* |:menu|
350 N *+mksession* |:mksession|
351 N *+modify_fname* |filename-modifiers|
352 N *+mouse* Mouse handling |mouse-using|
353 N *+mouseshape* |'mouseshape'|
354 B *+mouse_dec* Unix only: Dec terminal mouse handling |dec-mouse|
355 N *+mouse_gpm* Unix only: Linux console mouse handling |gpm-mouse|
356 B *+mouse_netterm* Unix only: netterm mouse handling |netterm-mouse|
7feea41 Update runtime files.
Bram Moolenaar authored
357 N *+mouse_pterm* QNX only: pterm mouse handling |qnx-terminal|
97186ba updated for version 7.2a
vimboss authored
358 N *+mouse_sysmouse* Unix only: *BSD console mouse handling |sysmouse|
7b671a2 Update runtime files.
Bram Moolenaar authored
359 B *+mouse_sgr* Unix only: sgr mouse handling |sgr-mouse|
7feea41 Update runtime files.
Bram Moolenaar authored
360 N *+mouse_urxvt* Unix only: urxvt mouse handling |urxvt-mouse|
361 N *+mouse_xterm* Unix only: xterm mouse handling |xterm-mouse|
362 B *+multi_byte* 16 and 32 bit characters |multibyte|
e5c6ef7 updated for version 7.0001
vimboss authored
363 *+multi_byte_ime* Win32 input method for multibyte chars |multibyte-ime|
7feea41 Update runtime files.
Bram Moolenaar authored
364 N *+multi_lang* non-English language support |multi-lang|
5057849 updated for version 7.0006
vimboss authored
365 m *+mzscheme* Mzscheme interface |mzscheme|
20ea828 updated for version 7.0179
vimboss authored
366 m *+mzscheme/dyn* Mzscheme interface |mzscheme-dynamic| |/dyn|
e5c6ef7 updated for version 7.0001
vimboss authored
367 m *+netbeans_intg* |netbeans|
a801156 @b4winckler Merge branch 'vim'
authored
368 m *+odbeditor* MacVim only: ODB Editor Protocol support |odbeditor|
591d30c Update runtime files.
Bram Moolenaar authored
369 m *+ole* Win32 GUI only: |ole-interface|
370 N *+path_extra* Up/downwards search in 'path' and 'tags'
25162ac updated for version 7.0158
vimboss authored
371 m *+perl* Perl interface |perl|
372 m *+perl/dyn* Perl interface |perl-dynamic| |/dyn|
05246bf Runtime file updates. Fix tar plugin window split.
Bram Moolenaar authored
373 N *+persistent_undo* Persistent undo |undo-persistence|
591d30c Update runtime files.
Bram Moolenaar authored
374 *+postscript* |:hardcopy| writes a PostScript file
e5c6ef7 updated for version 7.0001
vimboss authored
375 N *+printer* |:hardcopy| command
51d63e5 updated for version 7.0055
vimboss authored
376 H *+profile* |:profile| command
d7c11bc Small docs fixes.
Bram Moolenaar authored
377 m *+python* Python 2 interface |python|
591d30c Update runtime files.
Bram Moolenaar authored
378 m *+python/dyn* Python 2 interface |python-dynamic| |/dyn|
d7c11bc Small docs fixes.
Bram Moolenaar authored
379 m *+python3* Python 3 interface |python|
591d30c Update runtime files.
Bram Moolenaar authored
380 m *+python3/dyn* Python 3 interface |python-dynamic| |/dyn|
e5c6ef7 updated for version 7.0001
vimboss authored
381 N *+quickfix* |:make| and |quickfix| commands
97186ba updated for version 7.2a
vimboss authored
382 N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout,
383 'redrawtime' option
e5c6ef7 updated for version 7.0001
vimboss authored
384 B *+rightleft* Right to left typing |'rightleft'|
25162ac updated for version 7.0158
vimboss authored
385 m *+ruby* Ruby interface |ruby|
386 m *+ruby/dyn* Ruby interface |ruby-dynamic| |/dyn|
591d30c Update runtime files.
Bram Moolenaar authored
387 N *+scrollbind* |'scrollbind'|
e5c6ef7 updated for version 7.0001
vimboss authored
388 B *+signs* |:sign|
591d30c Update runtime files.
Bram Moolenaar authored
389 N *+smartindent* |'smartindent'|
e5c6ef7 updated for version 7.0001
vimboss authored
390 m *+sniff* SniFF interface |sniff|
591d30c Update runtime files.
Bram Moolenaar authored
391 N *+startuptime* |--startuptime| argument
392 N *+statusline* Options 'statusline', 'rulerformat' and special
e5c6ef7 updated for version 7.0001
vimboss authored
393 formats of 'titlestring' and 'iconstring'
394 m *+sun_workshop* |workshop|
395 N *+syntax* Syntax highlighting |syntax|
396 *+system()* Unix only: opposite of |+fork|
9fef527 Updated runtime files.
Bram Moolenaar authored
397 N *+tag_binary* binary searching in tags file |tag-binary-search|
e5c6ef7 updated for version 7.0001
vimboss authored
398 N *+tag_old_static* old method for static tags |tag-old-static|
399 m *+tag_any_white* any white space allowed in tags file |tag-any-white|
9fef527 Updated runtime files.
Bram Moolenaar authored
400 m *+tcl* Tcl interface |tcl|
25162ac updated for version 7.0158
vimboss authored
401 m *+tcl/dyn* Tcl interface |tcl-dynamic| |/dyn|
e5c6ef7 updated for version 7.0001
vimboss authored
402 *+terminfo* uses |terminfo| instead of termcap
403 N *+termresponse* support for |t_RV| and |v:termresponse|
9fef527 Updated runtime files.
Bram Moolenaar authored
404 N *+textobjects* |text-objects| selection
e5c6ef7 updated for version 7.0001
vimboss authored
405 *+tgetent* non-Unix only: able to use external termcap
49b03a5 updated for version 7.1a
vimboss authored
406 N *+title* Setting the window 'title' and 'icon'
e5c6ef7 updated for version 7.0001
vimboss authored
407 N *+toolbar* |gui-toolbar|
809f415 @b4winckler Docs updated on ODB support, fixed Info.plist
authored
408 m *+transparency* MacVim only: window background transparency
e5c6ef7 updated for version 7.0001
vimboss authored
409 N *+user_commands* User-defined commands. |user-commands|
410 N *+viminfo* |'viminfo'|
411 N *+vertsplit* Vertically split windows |:vsplit|
9fef527 Updated runtime files.
Bram Moolenaar authored
412 N *+virtualedit* |'virtualedit'|
e5c6ef7 updated for version 7.0001
vimboss authored
413 S *+visual* Visual mode |Visual-mode|
9fef527 Updated runtime files.
Bram Moolenaar authored
414 N *+visualextra* extra Visual mode commands |blockwise-operators|
e5c6ef7 updated for version 7.0001
vimboss authored
415 N *+vreplace* |gR| and |gr|
9fef527 Updated runtime files.
Bram Moolenaar authored
416 N *+wildignore* |'wildignore'|
e5c6ef7 updated for version 7.0001
vimboss authored
417 N *+wildmenu* |'wildmenu'|
418 S *+windows* more than one window
9fef527 Updated runtime files.
Bram Moolenaar authored
419 m *+writebackup* |'writebackup'| is default on
420 m *+xim* X input method |xim|
e5c6ef7 updated for version 7.0001
vimboss authored
421 *+xfontset* X fontset support |xfontset|
7b671a2 Update runtime files.
Bram Moolenaar authored
422 m *+xpm_w32* Win32 GUI only: pixmap support |w32-xpm-support|
e5c6ef7 updated for version 7.0001
vimboss authored
423 *+xsmp* XSMP (X session management) support
424 *+xsmp_interact* interactive XSMP (X session management) support
425 N *+xterm_clipboard* Unix only: xterm clipboard handling
9fef527 Updated runtime files.
Bram Moolenaar authored
426 m *+xterm_save* save and restore xterm screen |xterm-screens|
427 N *+X11* Unix only: can restore window title |X11|
e5c6ef7 updated for version 7.0001
vimboss authored
428
429 */dyn* *E370* *E448*
430 To some of the features "/dyn" is added when the
431 feature is only available when the related library can
432 be dynamically loaded.
433
434 :ve[rsion] {nr} Is now ignored. This was previously used to check the
435 version number of a .vimrc file. It was removed,
436 because you can now use the ":if" command for
437 version-dependent behavior. {not in Vi}
438
439 *:redi* *:redir*
440 :redi[r][!] > {file} Redirect messages to file {file}. The messages which
441 are the output of commands are written to that file,
442 until redirection ends. The messages are also still
443 shown on the screen. When [!] is included, an
444 existing file is overwritten. When [!] is omitted,
445 and {file} exists, this command fails.
446 Only one ":redir" can be active at a time. Calls to
447 ":redir" will close any active redirection before
448 starting redirection to the new target.
449 To stop the messages and commands from being echoed to
450 the screen, put the commands in a function and call it
451 with ":silent call Function()".
e747d8d updated for version 7.0077
vimboss authored
452 An alternative is to use the 'verbosefile' option,
453 this can be used in combination with ":redir".
e5c6ef7 updated for version 7.0001
vimboss authored
454 {not in Vi}
455
456 :redi[r] >> {file} Redirect messages to file {file}. Append if {file}
457 already exists. {not in Vi}
458
97186ba updated for version 7.2a
vimboss authored
459 :redi[r] @{a-zA-Z}
30004f7 updated for version 7.0078
vimboss authored
460 :redi[r] @{a-zA-Z}> Redirect messages to register {a-z}. Append to the
e5c6ef7 updated for version 7.0001
vimboss authored
461 contents of the register if its name is given
97186ba updated for version 7.2a
vimboss authored
462 uppercase {A-Z}. The ">" after the register name is
463 optional. {not in Vi}
8ce9c3b updated for version 7.0072
vimboss authored
464 :redi[r] @{a-z}>> Append messages to register {a-z}. {not in Vi}
e5c6ef7 updated for version 7.0001
vimboss authored
465
49b03a5 updated for version 7.1a
vimboss authored
466 :redi[r] @*>
467 :redi[r] @+> Redirect messages to the selection or clipboard. For
468 backward compatibility, the ">" after the register
469 name can be omitted. See |quotestar| and |quoteplus|.
470 {not in Vi}
471 :redi[r] @*>>
472 :redi[r] @+>> Append messages to the selection or clipboard.
473 {not in Vi}
e5c6ef7 updated for version 7.0001
vimboss authored
474
30004f7 updated for version 7.0078
vimboss authored
475 :redi[r] @"> Redirect messages to the unnamed register. For
476 backward compatibility, the ">" after the register
477 name can be omitted. {not in Vi}
8ce9c3b updated for version 7.0072
vimboss authored
478 :redi[r] @">> Append messages to the unnamed register. {not in Vi}
e5c6ef7 updated for version 7.0001
vimboss authored
479
883273d updated for version 7.0051
vimboss authored
480 :redi[r] => {var} Redirect messages to a variable. If the variable
481 doesn't exist, then it is created. If the variable
482 exists, then it is initialized to an empty string.
49b03a5 updated for version 7.1a
vimboss authored
483 The variable will remain empty until redirection ends.
883273d updated for version 7.0051
vimboss authored
484 Only string variables can be used. After the
485 redirection starts, if the variable is removed or
486 locked or the variable type is changed, then further
487 command output messages will cause errors. {not in Vi}
488
489 :redi[r] =>> {var} Append messages to an existing variable. Only string
490 variables can be used. {not in Vi}
491
e5c6ef7 updated for version 7.0001
vimboss authored
492 :redi[r] END End redirecting messages. {not in Vi}
493
494 *:sil* *:silent*
495 :sil[ent][!] {command} Execute {command} silently. Normal messages will not
496 be given or added to the message history.
497 When [!] is added, error messages will also be
498 skipped, and commands and mappings will not be aborted
499 when an error is detected. |v:errmsg| is still set.
500 When [!] is not used, an error message will cause
501 further messages to be displayed normally.
502 Redirection, started with |:redir|, will continue as
503 usual, although there might be small differences.
504 This will allow redirecting the output of a command
505 without seeing it on the screen. Example: >
506 :redir >/tmp/foobar
507 :silent g/Aap/p
508 :redir END
509 < To execute a Normal mode command silently, use the
510 |:normal| command. For example, to search for a
511 string without messages: >
512 :silent exe "normal /path\<CR>"
513 < ":silent!" is useful to execute a command that may
514 fail, but the failure is to be ignored. Example: >
515 :let v:errmsg = ""
516 :silent! /^begin
517 :if v:errmsg != ""
518 : ... pattern was not found
519 < ":silent" will also avoid the hit-enter prompt. When
520 using this for an external command, this may cause the
521 screen to be messed up. Use |CTRL-L| to clean it up
522 then.
523 ":silent menu ..." defines a menu that will not echo a
524 Command-line command. The command will still produce
525 messages though. Use ":silent" in the command itself
526 to avoid that: ":silent menu .... :silent command".
527
b3ec0ad updated for version 7.2-223
vimboss authored
528 *:uns* *:unsilent*
529 :uns[ilent] {command} Execute {command} not silently. Only makes a
530 difference when |:silent| was used to get to this
531 command.
532 Use this for giving a message even when |:silent| was
533 used. In this example |:silent| is used to avoid the
534 message about reading the file and |:unsilent| to be
535 able to list the first line of each file. >
536 :silent argdo unsilent echo expand('%') . ": " . getline(1)
537 <
538
e5c6ef7 updated for version 7.0001
vimboss authored
539 *:verb* *:verbose*
540 :[count]verb[ose] {command}
541 Execute {command} with 'verbose' set to [count]. If
3bd139f Various changes
vimboss authored
542 [count] is omitted one is used. ":0verbose" can be
543 used to set 'verbose' to zero.
e5c6ef7 updated for version 7.0001
vimboss authored
544 The additional use of ":silent" makes messages
545 generated but not displayed.
546 The combination of ":silent" and ":verbose" can be
547 used to generate messages and check them with
548 |v:statusmsg| and friends. For example: >
549 :let v:statusmsg = ""
550 :silent verbose runtime foobar.vim
551 :if v:statusmsg != ""
552 : " foobar.vim could not be found
553 :endif
554 < When concatenating another command, the ":verbose"
555 only applies to the first one: >
556 :4verbose set verbose | set verbose
557 < verbose=4 ~
558 verbose=0 ~
e747d8d updated for version 7.0077
vimboss authored
559 For logging verbose messages in a file use the
560 'verbosefile' option.
e5c6ef7 updated for version 7.0001
vimboss authored
561
3e924af updated for version 7.0132
vimboss authored
562 *:verbose-cmd*
563 When 'verbose' is non-zero, listing the value of a Vim option or a key map or
3d2cce3 updated for version 7.0140
vimboss authored
564 an abbreviation or a user-defined function or a command or a highlight group
565 or an autocommand will also display where it was last defined. If it was
566 defined manually then there will be no "Last set" message. When it was
567 defined while executing a function, user command or autocommand, the script in
568 which it was defined is reported.
68c020b Make the references to features in the help more consistent. (Sylvain…
Bram Moolenaar authored
569 {not available when compiled without the |+eval| feature}
3e924af updated for version 7.0132
vimboss authored
570
e5c6ef7 updated for version 7.0001
vimboss authored
571 *K*
572 K Run a program to lookup the keyword under the
573 cursor. The name of the program is given with the
574 'keywordprg' (kp) option (default is "man"). The
575 keyword is formed of letters, numbers and the
576 characters in 'iskeyword'. The keyword under or
577 right of the cursor is used. The same can be done
578 with the command >
579 :!{program} {keyword}
580 < There is an example of a program to use in the tools
581 directory of Vim. It is called 'ref' and does a
582 simple spelling check.
583 Special cases:
584 - If 'keywordprg' is empty, the ":help" command is
585 used. It's a good idea to include more characters
586 in 'iskeyword' then, to be able to find more help.
587 - When 'keywordprg' is equal to "man", a count before
588 "K" is inserted after the "man" command and before
589 the keyword. For example, using "2K" while the
590 cursor is on "mkdir", results in: >
591 !man 2 mkdir
592 < - When 'keywordprg' is equal to "man -s", a count
593 before "K" is inserted after the "-s". If there is
594 no count, the "-s" is removed.
595 {not in Vi}
596
597 *v_K*
598 {Visual}K Like "K", but use the visually highlighted text for
599 the keyword. Only works when the highlighted text is
600 not more than one line. {not in Vi}
601
602 [N]gs *gs* *:sl* *:sleep*
603 :[N]sl[eep] [N] [m] Do nothing for [N] seconds. When [m] is included,
937a4c7 updated for version 7.0066
vimboss authored
604 sleep for [N] milliseconds. The count for "gs" always
e5c6ef7 updated for version 7.0001
vimboss authored
605 uses seconds. The default is one second. >
606 :sleep "sleep for one second
607 :5sleep "sleep for five seconds
608 :sleep 100m "sleep for a hundred milliseconds
609 10gs "sleep for ten seconds
610 < Can be interrupted with CTRL-C (CTRL-Break on MS-DOS).
e2185b7 updated for version 7.0045
vimboss authored
611 "gs" stands for "goto sleep".
612 While sleeping the cursor is positioned in the text,
613 if at a visible position. {not in Vi}
b2ebf7c Updated runtime files.
Bram Moolenaar authored
614 Also process the received netbeans messages. {only
615 available when compiled with the |+netbeans_intg|
616 feature}
617
e5c6ef7 updated for version 7.0001
vimboss authored
618
619 *g_CTRL-A*
620 g CTRL-A Only when Vim was compiled with MEM_PROFILING defined
621 (which is very rare): print memory usage statistics.
622 Only useful for debugging Vim.
623
624 ==============================================================================
7e9a35b Updated runtime files.
Bram Moolenaar authored
625 2. Using Vim like less or more *less*
e5c6ef7 updated for version 7.0001
vimboss authored
626
627 If you use the less or more program to view a file, you don't get syntax
628 highlighting. Thus you would like to use Vim instead. You can do this by
629 using the shell script "$VIMRUNTIME/macros/less.sh".
630
631 This shell script uses the Vim script "$VIMRUNTIME/macros/less.vim". It sets
632 up mappings to simulate the commands that less supports. Otherwise, you can
633 still use the Vim commands.
634
635 This isn't perfect. For example, when viewing a short file Vim will still use
636 the whole screen. But it works good enough for most uses, and you get syntax
637 highlighting.
638
639 The "h" key will give you a short overview of the available commands.
640
641 vim:tw=78:ts=8:ft=help:norl:
Something went wrong with that request. Please try again.