1- *change.txt* For Vim version 7.4. Last change: 2014 Jun 26
1+ *change.txt* For Vim version 7.4. Last change: 2015 Jan 27
22
33
44 VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1103,11 +1103,12 @@ There are nine types of registers: *registers* *E354*
110311032. 10 numbered registers "0 to "9
110411043. The small delete register "-
110511054. 26 named registers "a to "z or "A to "Z
1106- 5. four read-only registers ":, "., "% and "#
1107- 6. the expression register "=
1108- 7. The selection and drop registers "*, "+ and "~
1109- 8. The black hole register "_
1110- 9. Last search pattern register "/
1106+ 5. three read-only registers ":, "., "%
1107+ 7. alternate buffer register "#
1108+ 7. the expression register "=
1109+ 8. The selection and drop registers "*, "+ and "~
1110+ 9. The black hole register "_
1111+ 10. Last search pattern register "/
11111112
111211131. Unnamed register "" *quote_quote* *quotequote*
11131114Vim fills this register with text deleted with the "d", "c", "s", "x" commands
@@ -1153,7 +1154,7 @@ letters to replace their previous contents or as uppercase letters to append
11531154to their previous contents. When the '>' flag is present in 'cpoptions' then
11541155a line break is inserted before the appended text.
11551156
1156- 5. Read-only registers ":, "., "% and "#
1157+ 5. Read-only registers ":, ". and "%
11571158These are '%', '#', ':' and '.'. You can use them only with the "p", "P",
11581159and ":put" commands and with CTRL-R . {not in Vi}
11591160 *quote_.* *quote.* *E29*
@@ -1164,8 +1165,6 @@ and ":put" commands and with CTRL-R. {not in Vi}
11641165 ('textwidth' and other options affect what is inserted).
11651166 *quote_%* *quote%*
11661167 "% Contains the name of the current file.
1167- *quote_#* *quote#*
1168- "# Contains the name of the alternate file.
11691168 *quote_:* *quote:* *E30*
11701169 ": Contains the most recent executed command-line. Example: Use
11711170 "@:" to repeat the previous command-line command.
@@ -1174,8 +1173,23 @@ and ":put" commands and with CTRL-R. {not in Vi}
11741173 the command was completely from a mapping.
11751174 {not available when compiled without the | +cmdline_hist |
11761175 feature}
1177-
1178- 6. Expression register "= *quote_=* *quote=* *@=*
1176+ *quote_#* *quote#*
1177+ 6. Alternate file register "#
1178+ Contains the name of the alternate file for the current window. It will
1179+ change how the | CTRL-^ | command works.
1180+ This register is writable, mainly to allow for restoring it after a plugin has
1181+ changed it. It accepts buffer number: >
1182+ let altbuf = bufnr(@#)
1183+ ...
1184+ let @# = altbuf
1185+ It will give error | E86 | if you pass buffer number and this buffer does not
1186+ exist.
1187+ It can also accept a match with an existing buffer name: >
1188+ let @# = 'buffer_name'
1189+ Error | E93 | if there is more than one buffer matching the given name or | E94 |
1190+ if none of buffers matches the given name.
1191+
1192+ 7. Expression register "= *quote_=* *quote=* *@=*
11791193This is not really a register that stores text, but is a way to use an
11801194expression in commands which use a register. The expression register is
11811195read-only; you cannot put text into it. After the '=', the cursor moves to
@@ -1196,7 +1210,7 @@ If the "= register is used for the "p" command, the String is split up at <NL>
11961210characters. If the String ends in a <NL> , it is regarded as a linewise
11971211register. {not in Vi}
11981212
1199- 7 . Selection and drop registers "*, "+ and "~
1213+ 8 . Selection and drop registers "*, "+ and "~
12001214Use these registers for storing and retrieving the selected text for the GUI.
12011215See | quotestar | and | quoteplus | . When the clipboard is not available or not
12021216working, the unnamed register is used instead. For Unix systems the clipboard
@@ -1218,12 +1232,12 @@ GTK GUI}
12181232Note: The "~ register is only used when dropping plain text onto Vim.
12191233Drag'n'drop of URI lists is handled internally.
12201234
1221- 8 . Black hole register "_ *quote_*
1235+ 9 . Black hole register "_ *quote_*
12221236When writing to this register, nothing happens. This can be used to delete
12231237text without affecting the normal registers. When reading from this register,
12241238nothing is returned. {not in Vi}
12251239
1226- 9 . Last search pattern register "/ *quote_/* *quote/*
1240+ 10 . Last search pattern register "/ *quote_/* *quote/*
12271241Contains the most recent search-pattern. This is used for "n" and 'hlsearch' .
12281242It is writable with `:let ` , you can change it to have 'hlsearch' highlight
12291243other matches without actually searching. You can't yank or delete into this
0 commit comments