Skip to content

Commit 7678f08

Browse files
committed
Update builtin.{txt,jax}
1 parent 19f0268 commit 7678f08

File tree

2 files changed

+12
-101
lines changed

2 files changed

+12
-101
lines changed

doc/builtin.jax

Lines changed: 6 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Nov 09
1+
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Nov 28
22

33

44
VIM リファレンスマニュアル by Bram Moolenaar
@@ -149,7 +149,6 @@ complete({startcol}, {matches}) なし 挿入モード補完を設定する
149149
complete_add({expr}) 数値 補完候補を追加する
150150
complete_check() 数値 補完中に押されたキーをチェックする
151151
complete_info([{what}]) 辞書 現在の補完情報を取得
152-
complete_match([{lnum}, {col}]) リスト 補完のカラムとトリガー文字列を取得
153152
confirm({msg} [, {choices} [, {default} [, {type}]]])
154153
数値 ユーザーへの選択肢と番号
155154
copy({expr}) 任意 {expr}の浅いコピーを作る
@@ -984,8 +983,8 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()*
984983
< ただし、{text} が空のリストの場合、{lnum} は実際には使用されな
985984
いため、無効な {lnum} に対してエラーは発生しない。
986985

987-
リストの後に |method| としても使用でき、ベースは第2引数として
988-
渡される: >
986+
リストの後に |method| としても使用でき、ベースは第 3 引数とし
987+
て渡される: >
989988
mylist->appendbufline(buf, lnum)
990989
<
991990
戻り値の型: |Number|
@@ -2112,50 +2111,6 @@ complete_info([{what}]) *complete_info()*
21122111
<
21132112
戻り値の型: dict<any>
21142113

2115-
complete_match([{lnum}, {col}]) *complete_match()*
2116-
指定された位置から後方に検索し、'isexpand' オプションに従って
2117-
マッチした文字列のリストを返す。引数が指定されていない場合は、
2118-
現在のカーソル位置を使用する。
2119-
2120-
各マッチは、[startcol, trigger_text] を含むリストとして表され
2121-
る:
2122-
- startcol: 補完を開始する桁位置。トリガー位置が見つからない場
2123-
合は -1 を返す。複数文字のトリガーの場合は、最初の文字の桁を
2124-
返す。
2125-
- trigger_text: 'isexpand' からのマッチするトリガー文字列、ま
2126-
たはマッチするものが見つからなかったか、デフォルトの
2127-
'iskeyword' パターンを使用している場合は空の文字列。
2128-
2129-
'isexpand' が空の場合、'iskeyword' のパターン "\k\+$" を使用し
2130-
て現在のキーワードの開始位置を検索する。
2131-
2132-
例: >
2133-
set isexpand=.,->,/,/*,abc
2134-
func CustomComplete()
2135-
let res = complete_match()
2136-
if res->len() == 0 | return | endif
2137-
let [col, trigger] = res[0]
2138-
let items = []
2139-
if trigger == '/*'
2140-
let items = ['/** */']
2141-
elseif trigger == '/'
2142-
let items = ['/*! */', '// TODO:', '// fixme:']
2143-
elseif trigger == '.'
2144-
let items = ['length()']
2145-
elseif trigger =~ '^\->'
2146-
let items = ['map()', 'reduce()']
2147-
elseif trigger =~ '^\abc'
2148-
let items = ['def', 'ghk']
2149-
endif
2150-
if items->len() > 0
2151-
let startcol = trigger =~ '^/' ? col : col + len(trigger)
2152-
call complete(startcol, items)
2153-
endif
2154-
endfunc
2155-
inoremap <Tab> <Cmd>call CustomComplete()<CR>
2156-
<
2157-
戻り値の型: list<list<any>>
2158-
21592114

21602115
confirm({msg} [, {choices} [, {default} [, {type}]]]) *confirm()*
21612116
confirm()はユーザーに選択させるためのダイアログを提供する。戻
@@ -6718,8 +6673,9 @@ listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()*
67186673
に表示される。
67196674

67206675
上記のコールバックをトリガーする 3 番目の理由により、コールバッ
6721-
クに渡される行番号の有効性が保証されない。これが問題となる場合
6722-
は、{unbuffered} を |TRUE| に設定すること。
6676+
クに渡される行番号の有効性は保証されない。特に、終了値は
6677+
line('$') + 1 よりも大きくなる可能性がある。これが問題となる場
6678+
合は、{unbuffered} を |TRUE| に設定すること。
67236679

67246680
{unbuffered} が |TRUE| の場合、変更ごとに {callback} が呼び出
67256681
される。変更リストは単一の辞書のみを保持し、辞書内の "start"、

en/builtin.txt

Lines changed: 6 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 09
1+
*builtin.txt* For Vim version 9.1. Last change: 2025 Nov 28
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -136,7 +136,6 @@ complete({startcol}, {matches}) none set Insert mode completion
136136
complete_add({expr}) Number add completion match
137137
complete_check() Number check for key typed during completion
138138
complete_info([{what}]) Dict get current completion information
139-
complete_match([{lnum}, {col}]) List get completion column and trigger text
140139
confirm({msg} [, {choices} [, {default} [, {type}]]])
141140
Number number of choice picked by user
142141
copy({expr}) any make a shallow copy of {expr}
@@ -909,7 +908,7 @@ appendbufline({buf}, {lnum}, {text}) *appendbufline()*
909908
for an invalid {lnum}, since {lnum} isn't actually used.
910909

911910
Can also be used as a |method| after a List, the base is
912-
passed as the second argument: >
911+
passed as the third argument: >
913912
mylist->appendbufline(buf, lnum)
914913
<
915914
Return type: |Number|
@@ -2072,51 +2071,6 @@ complete_info([{what}]) *complete_info()*
20722071
Return type: dict<any>
20732072

20742073

2075-
complete_match([{lnum}, {col}]) *complete_match()*
2076-
Searches backward from the given position and returns a List
2077-
of matches according to the 'isexpand' option. When no
2078-
arguments are provided, uses the current cursor position.
2079-
2080-
Each match is represented as a List containing
2081-
[startcol, trigger_text] where:
2082-
- startcol: column position where completion should start,
2083-
or -1 if no trigger position is found. For multi-character
2084-
triggers, returns the column of the first character.
2085-
- trigger_text: the matching trigger string from 'isexpand',
2086-
or empty string if no match was found or when using the
2087-
default 'iskeyword' pattern.
2088-
2089-
When 'isexpand' is empty, uses the 'iskeyword' pattern "\k\+$"
2090-
to find the start of the current keyword.
2091-
2092-
Examples: >
2093-
set isexpand=.,->,/,/*,abc
2094-
func CustomComplete()
2095-
let res = complete_match()
2096-
if res->len() == 0 | return | endif
2097-
let [col, trigger] = res[0]
2098-
let items = []
2099-
if trigger == '/*'
2100-
let items = ['/** */']
2101-
elseif trigger == '/'
2102-
let items = ['/*! */', '// TODO:', '// fixme:']
2103-
elseif trigger == '.'
2104-
let items = ['length()']
2105-
elseif trigger =~ '^\->'
2106-
let items = ['map()', 'reduce()']
2107-
elseif trigger =~ '^\abc'
2108-
let items = ['def', 'ghk']
2109-
endif
2110-
if items->len() > 0
2111-
let startcol = trigger =~ '^/' ? col : col + len(trigger)
2112-
call complete(startcol, items)
2113-
endif
2114-
endfunc
2115-
inoremap <Tab> <Cmd>call CustomComplete()<CR>
2116-
<
2117-
Return type: list<list<any>>
2118-
2119-
21202074
confirm({msg} [, {choices} [, {default} [, {type}]]]) *confirm()*
21212075
confirm() offers the user a dialog, from which a choice can be
21222076
made. It returns the number of the choice. For the first
@@ -6819,9 +6773,10 @@ listener_add({callback} [, {buf} [, {unbuffered}]]) *listener_add()*
68196773
The entries are in the order the changes were made, thus the
68206774
most recent change is at the end.
68216775

6822-
Because of the third trigger reason for triggering a callback
6823-
listed above, the line numbers passed to the callback are not
6824-
guaranteed to be valid. If this is a problem then make
6776+
Because of the third reason for triggering a callback listed
6777+
above, the line numbers passed to the callback are not
6778+
guaranteed to be valid. In particular, the end value can be
6779+
greater than line('$') + 1. If this is a problem then make
68256780
{unbuffered} |TRUE|.
68266781

68276782
When {unbuffered} is |TRUE| the {callback} is invoked for every

0 commit comments

Comments
 (0)