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+
5375554.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
9941015and whether the corners are on an existing character. (Implementation detail:
9951016it actually works by first putting the register after the selection and then
9961017deleting 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*
9991025If 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*
10311057Vim fills this register with text deleted with the "d", "c", "s", "x" commands
10321058or copied with the yank "y" command, regardless of whether or not a specific
10331059register 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.
10361064Vim uses the contents of the unnamed register for any put command (p or P)
10371065which does not specify a register. Additionally you can access it with the
10381066name '"'. 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
10981126history for expressions. When you end the command-line by typing <CR> , Vim
10991127computes the result of the expression. If you end it with <Esc> , Vim abandons
11001128the 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
11061139register. {not in Vi}
11071140
110811417. Selection and drop registers "*, "+ and "~
0 commit comments