|
1 |
| -*builtin.txt* For Vim version 9.1. Last change: 2024 May 18 |
| 1 | +*builtin.txt* For Vim version 9.1. Last change: 2024 Jun 03 |
2 | 2 |
|
3 | 3 |
|
4 | 4 | VIM REFERENCE MANUAL by Bram Moolenaar
|
@@ -178,6 +178,8 @@ extendnew({expr1}, {expr2} [, {expr3}])
|
178 | 178 | List/Dict like |extend()| but creates a new
|
179 | 179 | List or Dictionary
|
180 | 180 | feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
|
| 181 | +filecopy({from}, {to}) Number |TRUE| if copying file {from} to {to} |
| 182 | + worked |
181 | 183 | filereadable({file}) Number |TRUE| if {file} is a readable file
|
182 | 184 | filewritable({file}) Number |TRUE| if {file} is a writable file
|
183 | 185 | filter({expr1}, {expr2}) List/Dict/Blob/String
|
@@ -2757,6 +2759,18 @@ feedkeys({string} [, {mode}]) *feedkeys()*
|
2757 | 2759 | Can also be used as a |method|: >
|
2758 | 2760 | GetInput()->feedkeys()
|
2759 | 2761 |
|
| 2762 | +filecopy({from}, {to}) *filecopy()* |
| 2763 | + Copy the file pointed to by the name {from} to {to}. The |
| 2764 | + result is a Number, which is |TRUE| if the file was copied |
| 2765 | + successfully, and |FALSE| when it failed. |
| 2766 | + If a file with name {to} already exists, it will fail. |
| 2767 | + Note that it does not handle directories (yet). |
| 2768 | + |
| 2769 | + This function is not available in the |sandbox|. |
| 2770 | + |
| 2771 | + Can also be used as a |method|: > |
| 2772 | + GetOldName()->filecopy(newname) |
| 2773 | +
|
2760 | 2774 | filereadable({file}) *filereadable()*
|
2761 | 2775 | The result is a Number, which is |TRUE| when a file with the
|
2762 | 2776 | name {file} exists, and can be read. If {file} doesn't exist,
|
@@ -4288,14 +4302,14 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
|
4288 | 4302 | The optional argument {opts} is a Dict and supports the
|
4289 | 4303 | following items:
|
4290 | 4304 |
|
4291 |
| - type Specify the region's selection type |
4292 |
| - (default: "v"): |
4293 |
| - "v" for |characterwise| mode |
4294 |
| - "V" for |linewise| mode |
4295 |
| - "<CTRL-V>" for |blockwise-visual| mode |
| 4305 | + type Specify the region's selection type. |
| 4306 | + See |getregtype()| for possible values, |
| 4307 | + except that the width can be omitted |
| 4308 | + and an empty string cannot be used. |
| 4309 | + (default: "v") |
4296 | 4310 |
|
4297 | 4311 | exclusive If |TRUE|, use exclusive selection
|
4298 |
| - for the end position |
| 4312 | + for the end position. |
4299 | 4313 | (default: follow 'selection')
|
4300 | 4314 |
|
4301 | 4315 | You can get the last selection type by |visualmode()|.
|
@@ -4341,10 +4355,25 @@ getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()*
|
4341 | 4355 | "bufnum" is the buffer number.
|
4342 | 4356 | "lnum" and "col" are the position in the buffer. The first
|
4343 | 4357 | column is 1.
|
4344 |
| - The "off" number is zero, unless 'virtualedit' is used. Then |
4345 |
| - it is the offset in screen columns from the start of the |
4346 |
| - character. E.g., a position within a <Tab> or after the last |
4347 |
| - character. |
| 4358 | + If the "off" number of a starting position is non-zero, it is |
| 4359 | + the offset in screen columns from the start of the character. |
| 4360 | + E.g., a position within a <Tab> or after the last character. |
| 4361 | + If the "off" number of an ending position is non-zero, it is |
| 4362 | + the offset of the character's first cell not included in the |
| 4363 | + selection, otherwise all its cells are included. |
| 4364 | + |
| 4365 | + Apart from the options supported by |getregion()|, {opts} also |
| 4366 | + supports the following: |
| 4367 | + |
| 4368 | + eol If |TRUE|, indicate positions beyond |
| 4369 | + the end of a line with "col" values |
| 4370 | + one more than the length of the line. |
| 4371 | + If |FALSE|, positions are limited |
| 4372 | + within their lines, and if a line is |
| 4373 | + empty or the selection is entirely |
| 4374 | + beyond the end of a line, a "col" |
| 4375 | + value of 0 is used for both positions. |
| 4376 | + (default: |FALSE|) |
4348 | 4377 |
|
4349 | 4378 | Can also be used as a |method|: >
|
4350 | 4379 | getpos('.')->getregionpos(getpos("'a"))
|
|
0 commit comments