Skip to content

Commit e3b1cea

Browse files
authored
Merge pull request #1580 from vim-jp/hh-update-builtin
Update builtin.{txt,jax}
2 parents e502d43 + 96f9da4 commit e3b1cea

File tree

2 files changed

+79
-20
lines changed

2 files changed

+79
-20
lines changed

doc/builtin.jax

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim バージョン 9.1. Last change: 2024 May 18
1+
*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Jun 03
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -192,6 +192,8 @@ extendnew({expr1}, {expr2} [, {expr3}])
192192
リスト/辞書 |extend()| と同じだが新しいリスト/
193193
辞書を作る
194194
feedkeys({string} [, {mode}]) 数値 先行入力バッファにキーシーケンスを追加
195+
filecopy({from}, {to}) 数値 ファイル {from} を {to} へコピーできた
196+
場合は |TRUE|
195197
filereadable({file}) 数値 {file}が読み込み可能なら|TRUE|
196198
filewritable({file}) 数値 {file}が書き込み可能なら|TRUE|
197199
filter({expr1}, {expr2}) リスト/辞書/Blob/文字列
@@ -2754,9 +2756,20 @@ feedkeys({string} [, {mode}]) *feedkeys()*
27542756

27552757
|method| としても使用できる: >
27562758
GetInput()->feedkeys()
2757-
<
2758-
*filereadable()*
2759-
filereadable({file})
2759+
2760+
filecopy({from}, {to}) *filecopy()*
2761+
名前 {from} で指定されたファイルを {to} にコピーする。結果は数
2762+
値で、ファイルのコピーが成功した場合は |TRUE|、失敗した場合は
2763+
|FALSE| になる。
2764+
名前 {to} のファイルがすでに存在する場合は失敗する。
2765+
Note ディレクトリは処理されないことに注意 (まだ)。
2766+
2767+
この関数は |sandbox| では使用できない。
2768+
2769+
|method| としても使用できる: >
2770+
GetOldName()->filecopy(newname)
2771+
2772+
filereadable({file}) *filereadable()*
27602773
結果は数値で、{file}というファイルが存在し、読み込むことが可能
27612774
ならば|TRUE|となる。ファイル{file}が存在しないかディレクトリ
27622775
だった場合には、結果は|FALSE|となる。引数{file}は文字列として
@@ -4254,11 +4267,10 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
42544267

42554268
オプショナル引数の {opts} は以下の項目をサポートする辞書である:
42564269

4257-
type 範囲の選択のタイプを指定する (デフォル
4258-
ト: "v"):
4259-
"v" |characterwise| モード
4260-
"V" |linewise| モード
4261-
"<CTRL-V>" |blockwise-visual| モード
4270+
type 範囲の選択のタイプを指定する。可能な値
4271+
については |getregtype()| を参照。ただ
4272+
し、幅は省略可能で、空の文字列は使用で
4273+
きない。(デフォルト: "v")
42624274

42634275
exclusive |TRUE| の場合、末尾の位置に排他的な選
42644276
択を用いる。
@@ -4305,6 +4317,24 @@ getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()*
43054317
[bufnum, lnum, col, off]
43064318
"bufnum" はバッファ番号。
43074319
"lnum" と "col" はバッファ内の位置。最初の桁は 1 である。
4320+
開始位置の "off" の数値がゼロ以外の場合、それは文字の先頭から
4321+
の画面桁のオフセットである。例えば、<Tab> 内の位置、または最後
4322+
の文字の後の位置である。
4323+
終了位置の "off" の数値がゼロ以外の場合、それは選択範囲に含ま
4324+
れない文字の最初のセルのオフセットである。それ以外の場合は、そ
4325+
のすべてのセルが含まれる。
4326+
4327+
|getregion()| でサポートされているオプションとは別に、{opts}
4328+
は次のオプションもサポートしている:
4329+
4330+
eol |TRUE| の場合、行末を超える位置を、行
4331+
の長さより 1 大きい "col" 値で示す。
4332+
|FALSE| の場合、位置は行内に制限され、
4333+
行が空の場合、または選択範囲が行の末尾
4334+
を完全に超えている場合は、両方の位置に
4335+
対して "col" 値 0 が使用される。
4336+
(デフォルト: |FALSE|)
4337+
43084338
'virtualedit' が使用されない限り、"off" の数値はゼロである。次
43094339
に、それは文字の先頭からの画面桁のオフセットになる。例えば、
43104340
<Tab> 内または最後の文字の後の位置である。

en/builtin.txt

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -178,6 +178,8 @@ extendnew({expr1}, {expr2} [, {expr3}])
178178
List/Dict like |extend()| but creates a new
179179
List or Dictionary
180180
feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
181+
filecopy({from}, {to}) Number |TRUE| if copying file {from} to {to}
182+
worked
181183
filereadable({file}) Number |TRUE| if {file} is a readable file
182184
filewritable({file}) Number |TRUE| if {file} is a writable file
183185
filter({expr1}, {expr2}) List/Dict/Blob/String
@@ -2757,6 +2759,18 @@ feedkeys({string} [, {mode}]) *feedkeys()*
27572759
Can also be used as a |method|: >
27582760
GetInput()->feedkeys()
27592761
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+
27602774
filereadable({file}) *filereadable()*
27612775
The result is a Number, which is |TRUE| when a file with the
27622776
name {file} exists, and can be read. If {file} doesn't exist,
@@ -4288,14 +4302,14 @@ getregion({pos1}, {pos2} [, {opts}]) *getregion()*
42884302
The optional argument {opts} is a Dict and supports the
42894303
following items:
42904304

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")
42964310

42974311
exclusive If |TRUE|, use exclusive selection
4298-
for the end position
4312+
for the end position.
42994313
(default: follow 'selection')
43004314

43014315
You can get the last selection type by |visualmode()|.
@@ -4341,10 +4355,25 @@ getregionpos({pos1}, {pos2} [, {opts}]) *getregionpos()*
43414355
"bufnum" is the buffer number.
43424356
"lnum" and "col" are the position in the buffer. The first
43434357
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|)
43484377

43494378
Can also be used as a |method|: >
43504379
getpos('.')->getregionpos(getpos("'a"))

0 commit comments

Comments
 (0)