|
1 | | -*eval.txt* For Vim version 8.0. Last change: 2016 Sep 28 |
| 1 | +*eval.txt* For Vim version 8.0. Last change: 2016 Oct 02 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
@@ -6168,9 +6168,9 @@ range({expr} [, {max} [, {stride}]]) *range()* |
6168 | 6168 | *readfile()* |
6169 | 6169 | readfile({fname} [, {binary} [, {max}]]) |
6170 | 6170 | Read file {fname} and return a |List|, each line of the file |
6171 | | - as an item. Lines broken at NL characters. Macintosh files |
6172 | | - separated with CR will result in a single long line (unless a |
6173 | | - NL appears somewhere). |
| 6171 | + as an item. Lines are broken at NL characters. Macintosh |
| 6172 | + files separated with CR will result in a single long line |
| 6173 | + (unless a NL appears somewhere). |
6174 | 6174 | All NUL characters are replaced with a NL character. |
6175 | 6175 | When {binary} contains "b" binary mode is used: |
6176 | 6176 | - When the last line ends in a NL an extra empty list item is |
@@ -7390,6 +7390,9 @@ submatch({nr}[, {list}]) *submatch()* *E935* |
7390 | 7390 | |substitute()| this list will always contain one or zero |
7391 | 7391 | items, since there are no real line breaks. |
7392 | 7392 |
|
| 7393 | + When substitute() is used recursively only the submatches in |
| 7394 | + the current (deepest) call can be obtained. |
| 7395 | + |
7393 | 7396 | Example: > |
7394 | 7397 | :s/\d\+/\=submatch(0) + 1/ |
7395 | 7398 | < This finds the first number in the line and adds one to it. |
|
0 commit comments