Skip to content

Commit 8f3f58f

Browse files
committed
Update documentation files.
1 parent 28c3795 commit 8f3f58f

90 files changed

Lines changed: 2371 additions & 1036 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

runtime/doc/autocmd.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*autocmd.txt* For Vim version 7.2. Last change: 2008 Jun 27
1+
*autocmd.txt* For Vim version 7.2. Last change: 2009 Nov 25
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -59,10 +59,10 @@ Note: The ":autocmd" command cannot be followed by another command, since any
5959
:au[tocmd] [group] {event} {pat} [nested] {cmd}
6060
Add {cmd} to the list of commands that Vim will
6161
execute automatically on {event} for a file matching
62-
{pat}. Vim always adds the {cmd} after existing
63-
autocommands, so that the autocommands execute in the
64-
order in which they were given. See |autocmd-nested|
65-
for [nested].
62+
{pat} |autocmd-patterns|.
63+
Vim always adds the {cmd} after existing autocommands,
64+
so that the autocommands execute in the order in which
65+
they were given. See |autocmd-nested| for [nested].
6666

6767
The special pattern <buffer> or <buffer=N> defines a buffer-local autocommand.
6868
See |autocmd-buflocal|.
@@ -551,7 +551,7 @@ FileChangedShell When Vim notices that the modification time of
551551
buffer that was changed "<afile>".
552552
NOTE: The commands must not change the current
553553
buffer, jump to another buffer or delete a
554-
buffer. *E246*
554+
buffer. *E246* *E811*
555555
NOTE: This event never nests, to avoid an
556556
endless loop. This means that while executing
557557
commands for the FileChangedShell event no
@@ -835,9 +835,9 @@ The file pattern {pat} is tested for a match against the file name in one of
835835
two ways:
836836
1. When there is no '/' in the pattern, Vim checks for a match against only
837837
the tail part of the file name (without its leading directory path).
838-
2. When there is a '/' in the pattern, Vim checks for a match against the
839-
both short file name (as you typed it) and the full file name (after
840-
expanding it to a full path and resolving symbolic links).
838+
2. When there is a '/' in the pattern, Vim checks for a match against both the
839+
short file name (as you typed it) and the full file name (after expanding
840+
it to a full path and resolving symbolic links).
841841

842842
The special pattern <buffer> or <buffer=N> is used for buffer-local
843843
autocommands |autocmd-buflocal|. This pattern is not matched against the name
@@ -1052,7 +1052,7 @@ option will not cause any commands to be executed.
10521052
*:doautoa* *:doautoall*
10531053
:doautoa[ll] [group] {event} [fname]
10541054
Like ":doautocmd", but apply the autocommands to each
1055-
loaded buffer. Note that {fname} is used to select
1055+
loaded buffer. Note that [fname] is used to select
10561056
the autocommands, not the buffers to which they are
10571057
applied.
10581058
Careful: Don't use this for autocommands that delete a

runtime/doc/change.txt

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*change.txt* For Vim version 7.2. Last change: 2008 Jul 24
1+
*change.txt* For Vim version 7.2. Last change: 2009 Nov 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -506,9 +506,9 @@ comment (starting with '"') after the ":!" command.
506506
{filter}. Vim replaces the optional bangs with the
507507
latest given command and appends the optional [arg].
508508
Vim saves the output of the filter command in a
509-
temporary file and then reads the file into the
510-
buffer. Vim uses the 'shellredir' option to redirect
511-
the filter output to the temporary file.
509+
temporary file and then reads the file into the buffer
510+
|tempfile|. Vim uses the 'shellredir' option to
511+
redirect the filter output to the temporary file.
512512
However, if the 'shelltemp' option is off then pipes
513513
are used when possible (on Unix).
514514
When the 'R' flag is included in 'cpoptions' marks in
@@ -524,7 +524,9 @@ comment (starting with '"') after the ":!" command.
524524
option is empty (this is the default), use the
525525
internal formatting function |C-indenting|. But when
526526
'indentexpr' is not empty, it will be used instead
527-
|indent-expression|.
527+
|indent-expression|. When Vim was compiled without
528+
internal formatting then the "indent" program is used
529+
as a last resort.
528530

529531
*==*
530532
== Filter [count] lines like with ={motion}.
@@ -534,6 +536,22 @@ comment (starting with '"') after the ":!" command.
534536
{not in Vi}
535537

536538

539+
*tempfile* *setuid*
540+
Vim uses temporary files for filtering, generating diffs and also for
541+
tempname(). For Unix, the file will be in a private directory (only
542+
accessible by the current user) to avoid security problems (e.g., a symlink
543+
attack or other people reading your file). When Vim exits the directory and
544+
all files in it are deleted. When Vim has the setuid bit set this may cause
545+
problems, the temp file is owned by the setuid user but the filter command
546+
probably runs as the original user.
547+
On MS-DOS and OS/2 the first of these directories that works is used: $TMP,
548+
$TEMP, c:\TMP, c:\TEMP.
549+
For Unix the list of directories is: $TMPDIR, /tmp, current-dir, $HOME.
550+
For MS-Windows the GetTempFileName() system function is used.
551+
For other systems the tmpnam() library function is used.
552+
553+
554+
537555
4.2 Substitute *:substitute*
538556
*:s* *:su*
539557
:[range]s[ubstitute]/{pattern}/{string}/[flags] [count]
@@ -861,7 +879,10 @@ inside of strings can change! Also see 'softtabstop' option. >
861879

862880
*:reg* *:registers*
863881
:reg[isters] Display the contents of all numbered and named
864-
registers. {not in Vi}
882+
registers. If a register is written to for |:redir|
883+
it will not be listed.
884+
{not in Vi}
885+
865886

866887
:reg[isters] {arg} Display the contents of the numbered and named
867888
registers that are mentioned in {arg}. For example: >
@@ -994,6 +1015,11 @@ register. With blockwise selection it also depends on the size of the block
9941015
and whether the corners are on an existing character. (Implementation detail:
9951016
it actually works by first putting the register after the selection and then
9961017
deleting the selection.)
1018+
The previously selected text is put in the unnamed register. If you want to
1019+
put the same text into a Visual selection several times you need to use
1020+
another register. E.g., yank the text to copy, Visually select the text to
1021+
replace and use "0p . You can repeat this as many times as you like, the
1022+
unnamed register will be changed each time.
9971023

9981024
*blockwise-register*
9991025
If you use a blockwise Visual mode command to get the text into the register,
@@ -1031,8 +1057,10 @@ There are nine types of registers: *registers* *E354*
10311057
Vim fills this register with text deleted with the "d", "c", "s", "x" commands
10321058
or copied with the yank "y" command, regardless of whether or not a specific
10331059
register was used (e.g. "xdd). This is like the unnamed register is pointing
1034-
to the last used register. An exception is the '_' register: "_dd does not
1035-
store the deleted text in any register.
1060+
to the last used register. Thus when appending using an uppercase register
1061+
name, the unnamed register contains the same text as the named register.
1062+
An exception is the '_' register: "_dd does not store the deleted text in any
1063+
register.
10361064
Vim uses the contents of the unnamed register for any put command (p or P)
10371065
which does not specify a register. Additionally you can access it with the
10381066
name '"'. This means you have to type two double quotes. Writing to the ""
@@ -1098,11 +1126,16 @@ normal command-line editing commands are available, including a special
10981126
history for expressions. When you end the command-line by typing <CR>, Vim
10991127
computes the result of the expression. If you end it with <Esc>, Vim abandons
11001128
the expression. If you do not enter an expression, Vim uses the previous
1101-
expression (like with the "/" command). The expression must evaluate to a
1102-
string. If the result is a number it's turned into a string. A List,
1103-
Dictionary or FuncRef results in an error message (use string() to convert).
1104-
If the "= register is used for the "p" command, the string is split up at <NL>
1105-
characters. If the string ends in a <NL>, it is regarded as a linewise
1129+
expression (like with the "/" command).
1130+
1131+
The expression must evaluate to a String. A Number is always automatically
1132+
converted to a String. For the "p" and ":put" command, if the result is a
1133+
Float it's converted into a String. If the result is a List each element is
1134+
turned into a String and used as a line. A Dictionary or FuncRef results in
1135+
an error message (use string() to convert).
1136+
1137+
If the "= register is used for the "p" command, the String is split up at <NL>
1138+
characters. If the String ends in a <NL>, it is regarded as a linewise
11061139
register. {not in Vi}
11071140

11081141
7. Selection and drop registers "*, "+ and "~

runtime/doc/cmdline.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*cmdline.txt* For Vim version 7.2. Last change: 2008 Sep 18
1+
*cmdline.txt* For Vim version 7.2. Last change: 2009 Oct 25
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -118,8 +118,6 @@ CTRL-U Remove all characters between the cursor position and
118118
preferred behavior, add the following to your .vimrc: >
119119
:cnoremap <C-U> <C-E><C-U>
120120
<
121-
Note: if the command-line becomes empty with one of the
122-
delete commands, Command-line mode is quit.
123121
*c_<Insert>*
124122
<Insert> Toggle between insert and overstrike. {not in Vi}
125123

@@ -485,14 +483,14 @@ And this in your .vimrc: >
485483

486484
The Ex commands have a few specialties:
487485

488-
*:quote*
486+
*:quote* *:comment*
489487
'"' at the start of a line causes the whole line to be ignored. '"'
490488
after a command causes the rest of the line to be ignored. This can be used
491489
to add comments. Example: >
492490
:set ai "set 'autoindent' option
493491
It is not possible to add a comment to a shell command ":!cmd" or to the
494-
":map" command and friends, because they see the '"' as part of their
495-
argument.
492+
":map" command and a few others, because they see the '"' as part of their
493+
argument. This is mentioned where the command is explained.
496494

497495
*:bar* *:\bar*
498496
'|' can be used to separate commands, so you can give multiple commands in one
@@ -744,8 +742,8 @@ characters have a special meaning. These can also be used in the expression
744742
function expand() |expand()|.
745743
% Is replaced with the current file name. *:_%* *c_%*
746744
# Is replaced with the alternate file name. *:_#* *c_#*
747-
#n (where n is a number) is replaced with the file name of
748-
buffer n. "#0" is the same as "#".
745+
#n (where n is a number) is replaced with *:_#0* *:_#n*
746+
the file name of buffer n. "#0" is the same as "#". *c_#n*
749747
## Is replaced with all names in the argument list *:_##* *c_##*
750748
concatenated, separated by spaces. Each space in a name
751749
is preceded with a backslash.
@@ -949,20 +947,20 @@ for the file "$home" in the root directory. A few examples:
949947

950948
==============================================================================
951949
6. Command-line window *cmdline-window* *cmdwin*
952-
950+
*command-line-window*
953951
In the command-line window the command line can be edited just like editing
954952
text in any window. It is a special kind of window, because you cannot leave
955953
it in a normal way.
956954
{not available when compiled without the |+cmdline_hist| or |+vertsplit|
957955
feature}
958956

959957

960-
OPEN
958+
OPEN *c_CTRL-F* *q:* *q/* *q?*
961959

962960
There are two ways to open the command-line window:
963961
1. From Command-line mode, use the key specified with the 'cedit' option.
964962
The default is CTRL-F when 'compatible' is not set.
965-
2. From Normal mode, use the "q:", "q/" or "q?" command. *q:* *q/* *q?*
963+
2. From Normal mode, use the "q:", "q/" or "q?" command.
966964
This starts editing an Ex command-line ("q:") or search string ("q/" or
967965
"q?"). Note that this is not possible while recording is in progress (the
968966
"q" stops recording then).
@@ -992,7 +990,8 @@ nesting.
992990
The command-line window is not a normal window. It is not possible to move to
993991
another window or edit another buffer. All commands that would do this are
994992
disabled in the command-line window. Of course it _is_ possible to execute
995-
any command that you entered in the command-line window.
993+
any command that you entered in the command-line window. Other text edits are
994+
discarded when closing the window.
996995

997996

998997
CLOSE *E199*
@@ -1027,7 +1026,7 @@ VARIOUS
10271026

10281027
The command-line window cannot be used:
10291028
- when there already is a command-line window (no nesting)
1030-
- for entering a encryption key or when using inputsecret()
1029+
- for entering an encryption key or when using inputsecret()
10311030
- when Vim was not compiled with the +vertsplit feature
10321031

10331032
Some options are set when the command-line window is opened:

runtime/doc/debug.txt

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*debug.txt* For Vim version 7.2. Last change: 2006 May 01
1+
*debug.txt* For Vim version 7.2. Last change: 2009 Jul 22
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -10,7 +10,8 @@ This is for debugging Vim itself, when it doesn't work properly.
1010
For debugging Vim scripts, functions, etc. see |debug-scripts|
1111

1212
1. Location of a crash, using gcc and gdb |debug-gcc|
13-
2. Windows Bug Reporting |debug-win32|
13+
2. Locating memory leaks |debug-leaks|
14+
3. Windows Bug Reporting |debug-win32|
1415

1516
==============================================================================
1617

@@ -38,7 +39,25 @@ This also applies when using the MingW tools.
3839

3940
==============================================================================
4041

41-
2. Windows Bug Reporting *debug-win32*
42+
2. Locating memory leaks *debug-leaks*
43+
44+
If you suspect Vim is leaking memory and you are using Linux, the valgrind
45+
tool is very useful to pinpoint memory leaks.
46+
47+
First of all, build Vim with EXITFREE defined. Search for this in MAKEFILE
48+
and uncomment the line.
49+
50+
Use this command to start Vim: *valgrind*
51+
>
52+
valgrind --log-file=valgrind.log ./vim
53+
54+
Note: Vim will run much slower. If your .vimrc is big or you have several
55+
plugins you need to be patient for startup, or run with the "-u NONE"
56+
argument.
57+
58+
==============================================================================
59+
60+
3. Windows Bug Reporting *debug-win32*
4261

4362
If the Windows version of Vim crashes in a reproducible manner, you can take
4463
some steps to provide a useful bug report.

runtime/doc/develop.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*develop.txt* For Vim version 7.2. Last change: 2007 May 11
1+
*develop.txt* For Vim version 7.2. Last change: 2008 Dec 17
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -64,7 +64,7 @@ completely different editor. Extensions are done with a "Vi spirit".
6464
hard time finding and remembering them. Keep in mind that more commands and
6565
options will be added later.
6666
- A feature that people do not know about is a useless feature. Don't add
67-
obscure features, or at least add hints in documentation that they exists.
67+
obscure features, or at least add hints in documentation that they exist.
6868
- Minimize using CTRL and other modifiers, they are more difficult to type.
6969
- There are many first-time and inexperienced Vim users. Make it easy for
7070
them to start using Vim and learn more over time.
@@ -323,7 +323,7 @@ Wrong: var=a*5;
323323
OK: var = a * 5;
324324

325325
In general: Use empty lines to group lines of code together. Put a comment
326-
just above the group of lines. This makes it more easy to quickly see what is
326+
just above the group of lines. This makes it easier to quickly see what is
327327
being done.
328328

329329
OK: /* Prepare for building the table. */

runtime/doc/diff.txt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*diff.txt* For Vim version 7.2. Last change: 2008 Jul 21
1+
*diff.txt* For Vim version 7.2. Last change: 2009 Sep 15
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -64,6 +64,9 @@ In each of the edited files these options are set:
6464

6565
These options are set local to the window. When editing another file they are
6666
reset to the global value.
67+
The options can still be overruled from a modeline when re-editing the file.
68+
However, 'foldmethod' and 'wrap' won't be set from a modeline when 'diff' is
69+
set.
6770

6871
The differences shown are actually the differences in the buffer. Thus if you
6972
make changes after loading a file, these will be included in the displayed
@@ -91,7 +94,7 @@ While already in Vim you can start diff mode in three ways.
9194
:diffthis Make the current window part of the diff windows. This sets
9295
the options like for "vimdiff".
9396

94-
:diffpatch {patchfile} *:diffp* *:diffpatch*
97+
:diffpatch {patchfile} *E816* *:diffp* *:diffpatch*
9598
Use the current buffer, patch it with the diff found in
9699
{patchfile} and open a buffer on the result. The options are
97100
set as for "vimdiff".
@@ -121,7 +124,8 @@ file for a moment and come back to the same file and be in diff mode again.
121124
*:diffo* *:diffoff*
122125
:diffoff Switch off diff mode for the current window.
123126

124-
:diffoff! Switch off diff mode for all windows in the current tab page.
127+
:diffoff! Switch off diff mode for the current window and in all windows
128+
in the current tab page where 'diff' is set.
125129

126130
The ":diffoff" command resets the relevant options to their default value.
127131
This may be different from what the values were before diff mode was started,
@@ -237,7 +241,8 @@ that the buffers will be equal within the specified range.
237241
*:diffg* *:diffget*
238242
:[range]diffg[et] [bufspec]
239243
Modify the current buffer to undo difference with another
240-
buffer. If [bufspec] is given, that buffer is used.
244+
buffer. If [bufspec] is given, that buffer is used. If
245+
[bufspec] refers to the current buffer then nothing happens.
241246
Otherwise this only works if there is one other buffer in diff
242247
mode.
243248
See below for [range].
@@ -323,7 +328,7 @@ The "1a2" item appends the line "bbb".
323328
The "4d4" item deletes the line "111".
324329
The '7c7" item replaces the line "GGG" with "ggg".
325330

326-
When 'diffexpr' is not empty, Vim evaluates to obtain a diff file in the
331+
When 'diffexpr' is not empty, Vim evaluates it to obtain a diff file in the
327332
format mentioned. These variables are set to the file names used:
328333

329334
v:fname_in original file
@@ -353,7 +358,7 @@ The "-a" argument is used to force comparing the files as text, comparing as
353358
binaries isn't useful. The "--binary" argument makes the files read in binary
354359
mode, so that a CTRL-Z doesn't end the text on DOS.
355360

356-
*E97*
361+
*E810* *E97*
357362
Vim will do a test if the diff output looks alright. If it doesn't, you will
358363
get an error message. Possible causes:
359364
- The "diff" program cannot be executed.

0 commit comments

Comments
 (0)