|
1 | | -*eval.txt* For Vim version 8.0. Last change: 2016 Sep 25 |
| 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 |
@@ -3072,7 +3072,7 @@ ch_log({msg} [, {handle}]) *ch_log()* |
3072 | 3072 | When {handle} is passed the channel number is used for the |
3073 | 3073 | message. |
3074 | 3074 | {handle} can be Channel or a Job that has a Channel. The |
3075 | | - Channel must open. |
| 3075 | + Channel must be open for the channel number to be used. |
3076 | 3076 |
|
3077 | 3077 | ch_logfile({fname} [, {mode}]) *ch_logfile()* |
3078 | 3078 | Start logging channel activity to {fname}. |
@@ -3738,7 +3738,7 @@ filter({expr1}, {expr2}) *filter()* |
3738 | 3738 | call filter(myList, {idx, val -> idx * val <= 42}) |
3739 | 3739 | < If you do not use "val" you can leave it out: > |
3740 | 3740 | call filter(myList, {idx -> idx % 2 == 1}) |
3741 | | -
|
| 3741 | +< |
3742 | 3742 | The operation is done in-place. If you want a |List| or |
3743 | 3743 | |Dictionary| to remain unmodified make a copy first: > |
3744 | 3744 | :let l = filter(copy(mylist), 'v:val =~ "KEEP"') |
@@ -4369,7 +4369,7 @@ getfperm({fname}) *getfperm()* |
4369 | 4369 | < This will hopefully (from a security point of view) display |
4370 | 4370 | the string "rw-r--r--" or even "rw-------". |
4371 | 4371 |
|
4372 | | - For setting permissins use |setfperm()|. |
| 4372 | + For setting permissions use |setfperm()|. |
4373 | 4373 |
|
4374 | 4374 | getftime({fname}) *getftime()* |
4375 | 4375 | The result is a Number, which is the last modification time of |
@@ -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