Skip to content

Commit 3ff425a

Browse files
authored
Merge pull request #2345 from h-east/update-builtin
Update builtin.{txt,jax}
2 parents dbef24e + 7d6b62e commit 3ff425a

File tree

2 files changed

+133
-55
lines changed

2 files changed

+133
-55
lines changed

doc/builtin.jax

Lines changed: 71 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Sep 18
1+
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Oct 01
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -394,7 +394,7 @@ lispindent({lnum}) 数値 {lnum}行目のLispインデント量を取得
394394
list2blob({list}) Blob 数値のリスト {list} をBlobに変換する
395395
list2str({list} [, {utf8}]) 文字列 数値のリスト {list} を文字列に変換する
396396
list2tuple({list}) Tuple 項目の {list} を tuple に変換する
397-
listener_add({callback} [, {buf}])
397+
listener_add({callback} [, {buf} [, {unbuffered}]])
398398
数値 変更を監視するためのコールバックを追加
399399
listener_flush([{buf}]) なし リスナーコールバックを呼び出す
400400
listener_remove({id}) なし リスナーコールバックを削除する
@@ -498,9 +498,11 @@ popup_setoptions({id}, {options})
498498
ンを設定する
499499
popup_settext({id}, {text}) なし ポップアップウィンドウ {id} のテキスト
500500
を設定する
501-
popup_show({id}) なし ポップアップウィンドウ {id} を再表示す
501+
popup_show({id}) 数値 ポップアップウィンドウ {id} を再表示す
502502
503503
pow({x}, {y}) 浮動小数点数 {x} の {y} 乗
504+
preinserted() 数値 カーソルの後ろにテキストが挿入されたか
505+
どうか
504506
prevnonblank({lnum}) 数値 {lnum}行目以前の空行でない行の行番号
505507
printf({fmt}, {expr1}...) 文字列 文字列を組み立てる
506508
prompt_getprompt({buf}) 文字列 プロンプト文字列の取得
@@ -1990,7 +1992,7 @@ complete({startcol}, {matches}) *complete()* *E785*
19901992
func ListMonths()
19911993
call complete(col('.'), ['January', 'February', 'March',
19921994
\ 'April', 'May', 'June', 'July', 'August',
1993-
\ 'September', \ 'October', 'November', 'December'])
1995+
\ 'September', 'October', 'November', 'December'])
19941996
return ''
19951997
endfunc
19961998
<
@@ -3030,6 +3032,9 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
30303032
:r 拡張子が削除される
30313033
:e 拡張子だけ
30323034

3035+
さらに多くの修飾子がサポートされている。完全な一覧について
3036+
は、|filename-modifiers| を参照。
3037+
30333038
例: >
30343039
:let &tags = expand("%:p:h") .. "/tags"
30353040
< '%' や '#' や '<' で始まる文字列を展開する時には、それに続くテ
@@ -5299,12 +5304,14 @@ gettext({text} [, {package}]) *gettext()*
52995304
getwininfo([{winid}]) *getwininfo()*
53005305
ウィンドウに関する情報を、辞書のリスト |List| として返す。
53015306

5302-
{winid}が与えられた場合、そのIDを持つウィンドウに関する情報が
5303-
リスト |List| として1項目にして返される。ウィンドウが存在しな
5304-
い場合、結果は空のリストになる。
5307+
{winid} が指定された場合、その ID を持つウィンドウに関する情報
5308+
が、1 つの項目を持つ |List| として返される。そのウィンドウが
5309+
|popup| ウィンドウの場合、そのポップアップウィンドウに関する情
5310+
報が返される。ウィンドウが存在しない場合、結果は空のリストにな
5311+
る。
53055312

5306-
{winid}がなければすべてのタブページのすべてのウィンドウに関す
5307-
る情報が返される
5313+
{winid} がない場合、すべてのタブページ (|popup| を除く) のすべ
5314+
てのウィンドウに関する情報が返される
53085315

53095316
リストの各項目は次のエントリを持つ辞書 |Dictionary| である:
53105317
botline 最下の完全に表示されたバッファ行
@@ -6633,14 +6640,19 @@ list2tuple({list}) *list2tuple()*
66336640
<
66346641
戻り値の型: tuple<{type}> (指定された |List| による)
66356642

6636-
listener_add({callback} [, {buf}]) *listener_add()*
6643+
listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()*
66376644
バッファ {buf} に変更が加えられたときに呼び出されるコールバッ
66386645
ク関数を追加する。
66396646
{buf} はバッファ名またはバッファ番号を参照する。許容値について
66406647
は、|bufname()| を参照。{buf}を省略すると、現在のバッファが使
66416648
用される。
66426649
|listener_remove()| に渡すことができる一意のIDを返す。
66436650

6651+
{buf} にすでにコールバックが登録されている場合は、新しいコール
6652+
バックが追加される前に >
6653+
listener_flush({buf})
6654+
< と同等の処理が実行される。
6655+
66446656
{callback} は 5 つの引数で呼び出される:
66456657
bufnr 変更されたバッファ
66466658
start 最初に変更された行番号
@@ -6680,19 +6692,35 @@ listener_add({callback} [, {buf}]) *listener_add()*
66806692
added 0
66816693
col 変更した最初の桁または 1
66826694

6683-
エントリは変更が行われた順になっているため、最新の変更は最後に
6684-
なる。行番号はコールバックが呼び出されたときに有効だが、後の変
6685-
更はそれらを無効にするかもしれない。したがって、後のためにコ
6686-
ピーを保持しても機能しないかもしれない。
6695+
{unbuffered} が |FALSE| であるか指定されていない場合は、
6696+
{callback} が呼び出される:
6697+
6698+
1. 画面が更新される直前。
6699+
2. |listener_flush()| が呼び出された時。
6700+
3. 行数を変更する変更が行われ、その結果、変更リスト内の行番号
6701+
が無効になる場合。
66876702

6688-
{callback} は、|listener_flush()| が呼び出されたとき、または、
6689-
行数を変更するような変更が行われ、変更リストの行番号が無効に
6690-
なったときに、画面が更新される直前に呼び出される。
6703+
エントリは変更が行われた順序で表示されるため、最新の変更は最後
6704+
に表示される。
6705+
6706+
上記のコールバックをトリガーする 3 番目の理由により、コールバッ
6707+
クに渡される行番号の有効性が保証されない。これが問題となる場合
6708+
は、{unbuffered} を |TRUE| に設定すること。
6709+
6710+
{unbuffered} が |TRUE| の場合、変更ごとに {callback} が呼び出
6711+
される。変更リストは単一の辞書のみを保持し、辞書内の "start"、
6712+
"end"、"added" の値は対応するコールバック引数と同じである。行
6713+
番号はコールバックが呼び出された時点では有効であるが、その後の
6714+
変更によって無効になる可能性がある。したがって、後で使用するた
6715+
めにコピーを保持してもうまく機能しない可能性がある。
66916716

66926717
{callback} はテキストをロックした状態で呼び出される。
66936718
|textlock| を参照。バッファを変更する必要がある場合は、後でこ
66946719
れを実行するためのタイマー |timer_start()| を使用すること。
66956720

6721+
*E1569*
6722+
{callback} 中に listener_add() を呼び出すことはできない。
6723+
66966724
バッファが最初にロードされた時には {callback} は呼び出されな
66976725
い。|BufReadPost| 自動コマンドイベントを使用して、バッファの初
66986726
期テキストを処理する。
@@ -7898,6 +7926,15 @@ pow({x}, {y}) *pow()*
78987926
戻り値の型: |Number|
78997927

79007928

7929+
preinserted() *preinserted()*
7930+
'completeopt' に "preinsert" が指定されている場合、または
7931+
'autocomplete' が有効な状態で 'completeopt' に "longest" が指
7932+
定されている場合、カーソルの後ろにテキストが挿入されていると 0
7933+
以外の値を返す。それ以外の場合は 0 を返す。
7934+
7935+
戻り値の型: |Number|
7936+
7937+
79017938
prevnonblank({lnum}) *prevnonblank()*
79027939
{lnum}行以前({lnum}行を含む)の最初の非空行の行番号を返す。
79037940
例: >
@@ -12053,23 +12090,23 @@ values({dict}) *values()*
1205312090

1205412091

1205512092
virtcol({expr} [, {list} [, {winid}]]) *virtcol()*
12056-
結果は数値で、{expr}で与えられるファイルの位置の、スクリーン上
12057-
での桁の位置を示す。返る値は、指定された位置にある文字の末尾が、
12058-
スクリーン座標(の桁)でどこに存在するかである。<Tab>(タブ文字)
12059-
が指定した位置にあった場合には、戻り値はそのタブの最後のカラム
12060-
(桁)位置になる。具体的に、'ts' が8に設定された状態で第1桁に
12061-
<Tab>があった場合、戻り値は8になる。|conceal| は無視される。
12062-
バイト位置については |col()| を使う。
12063-
12064-
{expr}の解釈の仕方については |getpos()| および |col()| を参照。
12093+
結果は数値で、{expr} で与えられるファイルの位置の、スクリーン
12094+
上での桁の位置を示す。つまり、その位置の文字の終わりまでの行の
12095+
部分が占める画面セルの合計数である。<Tab> が指定した位置にあっ
12096+
た場合には、戻り値はそのタブの最後の桁位置になる。具体的に、
12097+
'ts' が 8 に設定された状態で最初の桁に <Tab> があった場合、戻
12098+
り値は 8 になる。|conceal| は無視される。バイト位置については
12099+
|col()| を使う。
12100+
12101+
{expr} の解釈の仕方については |getpos()| および |col()| を参照。
1206512102
{expr} が "$" の場合、カーソル行末を意味するため、結果はカーソ
1206612103
ル行のセル数に 1 を加えた数になる。
1206712104

12068-
'virtualedit' がオンのときは[lnum, col, off]というリストを指定
12069-
することもできる。"off" は文字の開始位置からのスクリーン座標で
12070-
のオフセットである。例えば、<Tab>の中の位置や、行の最後の文字
12071-
以降の位置を示すために使う。"off" が省略された場合はゼロが使わ
12072-
れる
12105+
'virtualedit' がオンのときは [lnum, col, off] というリストを指
12106+
定することもできる。"off" は文字の開始位置からのスクリーン座標
12107+
でのオフセットである。例えば、<Tab> の中の位置や、行の最後の文
12108+
字以降の位置を示すために使う。"off" が省略された場合はゼロが使
12109+
われる
1207312110
現在のモードに対して仮想編集がオンのときは、行末を越えた位置が
1207412111
返ってくることもある。'virtualedit' も参照。
1207512112

@@ -12379,7 +12416,7 @@ winbufnr({nr}) 結果は数値で、{nr}番目のウィンドウに関連付け
1237912416
番号が返る。{nr}で存在しないウィンドウを指定した場合には-1が返
1238012417
る。
1238112418
例: >
12382-
:echo "The file in the current window is " . bufname(winbufnr(0))
12419+
:echo "The file in the current window is " .. bufname(winbufnr(0))
1238312420
<
1238412421
|method| としても使用できる: >
1238512422
FindWindow()->winbufnr()->bufname()
@@ -12895,7 +12932,8 @@ vreplace コマンド|gR|と|gr|をサポート (常に true)
1289512932
vtp vcon をサポート |+vtp| (現在のコンソール内で機能するか
1289612933
どうかを調べるには vcon を確認する)
1289712934
wayland Wayland プロトコルをサポート
12898-
wayland_clipboard Wayland のセレクション/クリップボートのサポート
12935+
wayland_clipboard Wayland のクリップボートのサポート
12936+
wayland_focus_steal Wayland のクリップボードのフォーカススティールのサポート
1289912937
wildignore オプション 'wildignore' をサポート
1290012938
wildmenu オプション 'wildmenu' を指定してコンパイル
1290112939
win16 MS-Windows 3.1 用の古いバージョン (常に false)

en/builtin.txt

Lines changed: 62 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2025 Sep 18
1+
*builtin.txt* For Vim version 9.1. Last change: 2025 Oct 01
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -369,7 +369,7 @@ lispindent({lnum}) Number Lisp indent for line {lnum}
369369
list2blob({list}) Blob turn {list} of numbers into a Blob
370370
list2str({list} [, {utf8}]) String turn {list} of numbers into a String
371371
list2tuple({list}) Tuple turn {list} of items into a tuple
372-
listener_add({callback} [, {buf}])
372+
listener_add({callback} [, {buf} [, {unbuffered}]])
373373
Number add a callback to listen to changes
374374
listener_flush([{buf}]) none invoke listener callbacks
375375
listener_remove({id}) none remove a listener callback
@@ -451,8 +451,9 @@ popup_setbuf({id}, {buf}) Bool set the buffer for the popup window {id}
451451
popup_setoptions({id}, {options})
452452
none set options for popup window {id}
453453
popup_settext({id}, {text}) none set the text of popup window {id}
454-
popup_show({id}) none unhide popup window {id}
454+
popup_show({id}) Number unhide popup window {id}
455455
pow({x}, {y}) Float {x} to the power of {y}
456+
preinserted() Number whether text is inserted after cursor
456457
prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
457458
printf({fmt}, {expr1}...) String format text
458459
prompt_getprompt({buf}) String get prompt text
@@ -1939,7 +1940,7 @@ complete({startcol}, {matches}) *complete()* *E785*
19391940
func ListMonths()
19401941
call complete(col('.'), ['January', 'February', 'March',
19411942
\ 'April', 'May', 'June', 'July', 'August',
1942-
\ 'September', \ 'October', 'November', 'December'])
1943+
\ 'September', 'October', 'November', 'December'])
19431944
return ''
19441945
endfunc
19451946
<
@@ -3008,6 +3009,9 @@ expand({string} [, {nosuf} [, {list}]]) *expand()*
30083009
:r root (one extension removed)
30093010
:e extension only
30103011

3012+
More modifiers are supported, for the full list see
3013+
|filename-modifiers|.
3014+
30113015
Example: >
30123016
:let &tags = expand("%:p:h") .. "/tags"
30133017
< Note that when expanding a string that starts with '%', '#' or
@@ -5338,14 +5342,17 @@ gettext({text} [, {package}]) *gettext()*
53385342

53395343

53405344
getwininfo([{winid}]) *getwininfo()*
5341-
Returns information about windows as a |List| with Dictionaries.
5345+
Returns information about windows as a |List| with
5346+
Dictionaries.
53425347

5343-
If {winid} is given Information about the window with that ID
5344-
is returned, as a |List| with one item. If the window does not
5345-
exist the result is an empty list.
5348+
If {winid} is given, information about the window with that ID
5349+
is returned, as a |List| with one item. When that window is a
5350+
|popup| window, information about that popup window is
5351+
returned. If the window does not exist the result is an empty
5352+
list.
53465353

53475354
Without {winid} information about all the windows in all the
5348-
tab pages is returned.
5355+
tab pages (excluding |popup|s) is returned.
53495356

53505357
Each List item is a |Dictionary| with the following entries:
53515358
botline last complete displayed buffer line
@@ -6715,14 +6722,19 @@ list2tuple({list}) *list2tuple()*
67156722
Return type: tuple<{type}> (depending on the given |List|)
67166723

67176724

6718-
listener_add({callback} [, {buf}]) *listener_add()*
6725+
listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()*
67196726
Add a callback function that will be invoked when changes have
67206727
been made to buffer {buf}.
67216728
{buf} refers to a buffer name or number. For the accepted
67226729
values, see |bufname()|. When {buf} is omitted the current
67236730
buffer is used.
67246731
Returns a unique ID that can be passed to |listener_remove()|.
67256732

6733+
If the {buf} already has registered callbacks then the
6734+
equivalent of >
6735+
listener_flush({buf})
6736+
< is performed before the new callback is added.
6737+
67266738
The {callback} is invoked with five arguments:
67276739
bufnr the buffer that was changed
67286740
start first changed line number
@@ -6765,20 +6777,37 @@ listener_add({callback} [, {buf}]) *listener_add()*
67656777
added 0
67666778
col first column with a change or 1
67676779

6780+
When {unbuffered} is |FALSE| or not provided the {callback} is
6781+
invoked:
6782+
6783+
1. Just before the screen is updated.
6784+
2. When |listener_flush()| is called.
6785+
3. When a change is being made that changes the line count in
6786+
a way that causes a line number in the list of changes to
6787+
become invalid.
6788+
67686789
The entries are in the order the changes were made, thus the
6769-
most recent change is at the end. The line numbers are valid
6770-
when the callback is invoked, but later changes may make them
6771-
invalid, thus keeping a copy for later might not work.
6790+
most recent change is at the end.
6791+
6792+
Because of the third trigger reason for triggering a callback
6793+
listed above, the line numbers passed to the callback are not
6794+
guaranteed to be valid. If this is a problem then make
6795+
{unbuffered} |TRUE|.
67726796

6773-
The {callback} is invoked just before the screen is updated,
6774-
when |listener_flush()| is called or when a change is being
6775-
made that changes the line count in a way it causes a line
6776-
number in the list of changes to become invalid.
6797+
When {unbuffered} is |TRUE| the {callback} is invoked for every
6798+
single change. The changes list only holds a single dictionary
6799+
and the "start", "end" and "added" values in the dictionary are
6800+
the same as the corresponding callback arguments. The line
6801+
numbers are valid when the callback is invoked, but later
6802+
changes may make them invalid, thus keeping a copy for later
6803+
might not work.
67776804

67786805
The {callback} is invoked with the text locked, see
67796806
|textlock|. If you do need to make changes to the buffer, use
67806807
a timer to do this later |timer_start()|.
67816808

6809+
You may not call listener_add() during the {callback}. *E1569*
6810+
67826811
The {callback} is not invoked when the buffer is first loaded.
67836812
Use the |BufReadPost| autocmd event to handle the initial text
67846813
of a buffer.
@@ -8008,6 +8037,15 @@ pow({x}, {y}) *pow()*
80088037
Return type: |Number|
80098038

80108039

8040+
preinserted() *preinserted()*
8041+
Returns non-zero if text has been inserted after the cursor
8042+
because "preinsert" is present in 'completeopt', or because
8043+
"longest" is present in 'completeopt' while 'autocomplete'
8044+
is active. Otherwise returns zero.
8045+
8046+
Return type: |Number|
8047+
8048+
80118049
prevnonblank({lnum}) *prevnonblank()*
80128050
Return the line number of the first line at or above {lnum}
80138051
that is not blank. Example: >
@@ -12308,9 +12346,9 @@ values({dict}) *values()*
1230812346

1230912347
virtcol({expr} [, {list} [, {winid}]]) *virtcol()*
1231012348
The result is a Number, which is the screen column of the file
12311-
position given with {expr}. That is, the last screen position
12312-
occupied by the character at that position, when the screen
12313-
would be of unlimited width. When there is a <Tab> at the
12349+
position given with {expr}. That is, the total number of
12350+
screen cells occupied by the part of the line until the end of
12351+
the character at that position. When there is a <Tab> at the
1231412352
position, the returned Number will be the column at the end of
1231512353
the <Tab>. For example, for a <Tab> in column 1, with 'ts'
1231612354
set to 8, it returns 8. |conceal| is ignored.
@@ -12639,7 +12677,7 @@ winbufnr({nr}) The result is a Number, which is the number of the buffer
1263912677
window is returned.
1264012678
When window {nr} doesn't exist, -1 is returned.
1264112679
Example: >
12642-
:echo "The file in the current window is " . bufname(winbufnr(0))
12680+
:echo "The file in the current window is " .. bufname(winbufnr(0))
1264312681
<
1264412682
Can also be used as a |method|: >
1264512683
FindWindow()->winbufnr()->bufname()
@@ -13172,7 +13210,9 @@ vreplace Compiled with |gR| and |gr| commands. (always true)
1317213210
vtp Compiled for vcon support |+vtp| (check vcon to find
1317313211
out if it works in the current console).
1317413212
wayland Compiled with Wayland protocol support.
13175-
wayland_clipboard Compiled with support for Wayland selections/clipboard
13213+
wayland_clipboard Compiled with support for Wayland clipboard.
13214+
wayland_focus_steal Compiled with support for Wayland clipboard focus
13215+
stealing.
1317613216
wildignore Compiled with 'wildignore' option.
1317713217
wildmenu Compiled with 'wildmenu' option.
1317813218
win16 old version for MS-Windows 3.1 (always false)

0 commit comments

Comments
 (0)