Skip to content

Commit a602e82

Browse files
authored
Merge pull request #1902 from h-east/update-builtin
Update builtin.{txt,jax}
2 parents 45d9fd2 + 182cd00 commit a602e82

File tree

2 files changed

+126
-5
lines changed

2 files changed

+126
-5
lines changed

doc/builtin.jax

Lines changed: 63 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim バージョン 9.1. Last change: 2024 Dec 03
1+
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Jan 02
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -73,6 +73,8 @@ balloon_gettext() 文字列 バルーン内のカレントテキストを得る
7373
balloon_show({expr}) なし {expr} をバルーン内に表示
7474
balloon_split({msg}) リスト {msg} をバルーンで使われるように分割す
7575
76+
base64_decode({string}) Blob {string} 文字列を base64 デコードする
77+
base64_encode({blob}) 文字列 {blob} のバイトを base64 エンコードする
7678
bindtextdomain({package}, {path})
7779
なし 指定されたパスにテキストドメインをバイ
7880
ンドする
@@ -294,6 +296,8 @@ getregionpos({pos1}, {pos2} [, {opts}])
294296
リスト 領域の位置のリストを取得
295297
getregtype([{regname}]) 文字列 レジスタの種類を取得
296298
getscriptinfo([{opts}]) リスト 読み込まれたスクリプトの一覧
299+
getstacktrace() リスト Vim script の現在のスタックトレースを
300+
取得する
297301
gettabinfo([{expr}]) リスト タブページのリスト
298302
gettabvar({nr}, {varname} [, {def}])
299303
任意 タブ{nr}の変数{varname}または{def}
@@ -1294,6 +1298,43 @@ balloon_split({msg}) *balloon_split()*
12941298

12951299
戻り値の型: list<any> または list<string>
12961300

1301+
base64_decode({string}) *base64_decode()*
1302+
{string} の base64 でエンコードされた文字列からデコードされた
1303+
バイト列を含む Blob を返す。
1304+
1305+
{string} 引数は base64 でエンコードされた文字のみを含み、長さ
1306+
は 4 の倍数にする必要がある。
1307+
1308+
エラーの場合は空の blob を返す。
1309+
1310+
例: >
1311+
" デコードされた内容をバイナリファイルに書き込む
1312+
call writefile(base64_decode(s), 'tools.bmp')
1313+
" Base64でエンコードされた文字列をデコードする
1314+
echo list2str(blob2list(base64_decode(encodedstr)))
1315+
<
1316+
|method| としても使用できる: >
1317+
GetEncodedString()->base64_decode()
1318+
<
1319+
戻り値の型: |Blob|
1320+
1321+
1322+
base64_encode({blob}) *base64_encode()*
1323+
{blob} 内のバイト列を表す base64 エンコードされた文字列を返す。
1324+
RFC 4648 で定義されている base64 アルファベットが使用される。
1325+
1326+
例: >
1327+
" バイナリファイルの内容をエンコードする
1328+
echo base64_encode(readblob('somefile.bin'))
1329+
" 文字列をエンコードする
1330+
echo base64_encode(list2blob(str2list(somestr)))
1331+
<
1332+
|method| としても使用できる: >
1333+
GetBinaryData()->base64_encode()
1334+
<
1335+
戻り値の型: |String|
1336+
1337+
12971338
bindtextdomain({package}, {path}) *bindtextdomain()*
12981339
特定の {package} を {path} にバインドし、|gettext()| 関数を使っ
12991340
てパッケージの言語固有の翻訳を取得できるようにする。{path} は
@@ -1900,9 +1941,14 @@ complete_info([{what}]) *complete_info()*
19001941
値は |complete_info_mode| を参照。
19011942
pum_visible ポップアップメニューが表示されているなら |TRUE|
19021943
|pumvisible()| を参照。
1903-
items 補完マッチのリスト。各要素は "word", "abbr",
1944+
items 全補完マッチのリスト。各要素は "word", "abbr",
19041945
"menu", "kind", "info", "user_data" を含む辞書。
19051946
|complete-items| を参照。
1947+
matches "items" と同じだが、現在のクエリにマッチするア
1948+
イテムのみを返す。"matches" と "items" の両方
1949+
が "what" に含まれている場合、返されるリストの
1950+
名前は "items" のままだが、各アイテムには追加
1951+
の "match" フィールドがある。
19061952
selected 選択された補完候補のインデックス。最初のイン
19071953
デックスが 0。どの補完候補も選択されていなけれ
19081954
ば -1 (入力したテキストのみ表示、もしくは <Up>
@@ -4913,6 +4959,21 @@ getscriptinfo([{opts}]) *getscriptinfo()*
49134959
戻り値の型: list<dict<any>>
49144960

49154961

4962+
getstacktrace() *getstacktrace()*
4963+
Vim script の現在のスタックトレースを返す。
4964+
スタックトレースは |List| で、各項目は次の項目を含む
4965+
|Dictionary| である。
4966+
funcref スタックが関数にある場合は funcref、そうでない
4967+
場合はこの項目は存在しない。
4968+
event スタックが autocmd イベントの場合、イベント説
4969+
明の文字列。それ以外の場合、この項目は存在しな
4970+
い。
4971+
lnum スタック上のスクリプトの行番号。
4972+
filepath スタック上のスクリプトのファイルパス。
4973+
4974+
戻り値の型: list<dict<any>>
4975+
4976+
49164977
gettabinfo([{tabnr}]) *gettabinfo()*
49174978
{tabnr}を指定しないと、すべてのタブページに関する情報がリスト
49184979
|List| として返される。各リスト項目は辞書 |Dictionary| である。

en/builtin.txt

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2024 Dec 03
1+
*builtin.txt* For Vim version 9.1. Last change: 2025 Jan 02
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -67,6 +67,8 @@ autocmd_get([{opts}]) List return a list of autocmds
6767
balloon_gettext() String current text in the balloon
6868
balloon_show({expr}) none show {expr} inside the balloon
6969
balloon_split({msg}) List split {msg} as used for a balloon
70+
base64_decode({string}) Blob base64 decode {string} characters
71+
base64_encode({blob}) String base64 encode the bytes in {blob}
7072
bindtextdomain({package}, {path})
7173
Bool bind text domain to specified path
7274
blob2list({blob}) List convert {blob} into a list of numbers
@@ -277,6 +279,7 @@ getregionpos({pos1}, {pos2} [, {opts}])
277279
List get a list of positions for a region
278280
getregtype([{regname}]) String type of a register
279281
getscriptinfo([{opts}]) List list of sourced scripts
282+
getstacktrace() List get current stack trace of Vim scripts
280283
gettabinfo([{expr}]) List list of tab pages
281284
gettabvar({nr}, {varname} [, {def}])
282285
any variable {varname} in tab {nr} or {def}
@@ -1225,6 +1228,43 @@ balloon_split({msg}) *balloon_split()*
12251228

12261229
Return type: list<any> or list<string>
12271230

1231+
base64_decode({string}) *base64_decode()*
1232+
Return a Blob containing the bytes decoded from the base64
1233+
encoded characters in {string}.
1234+
1235+
The {string} argument should contain only base64-encoded
1236+
characters and should have a length that is a multiple of 4.
1237+
1238+
Returns an empty blob on error.
1239+
1240+
Examples: >
1241+
" Write the decoded contents to a binary file
1242+
call writefile(base64_decode(s), 'tools.bmp')
1243+
" Decode a base64-encoded string
1244+
echo list2str(blob2list(base64_decode(encodedstr)))
1245+
<
1246+
Can also be used as a |method|: >
1247+
GetEncodedString()->base64_decode()
1248+
<
1249+
Return type: |Blob|
1250+
1251+
1252+
base64_encode({blob}) *base64_encode()*
1253+
Return a base64-encoded String representing the bytes in
1254+
{blob}. The base64 alphabet defined in RFC 4648 is used.
1255+
1256+
Examples: >
1257+
" Encode the contents of a binary file
1258+
echo base64_encode(readblob('somefile.bin'))
1259+
" Encode a string
1260+
echo base64_encode(list2blob(str2list(somestr)))
1261+
<
1262+
Can also be used as a |method|: >
1263+
GetBinaryData()->base64_encode()
1264+
<
1265+
Return type: |String|
1266+
1267+
12281268
bindtextdomain({package}, {path}) *bindtextdomain()*
12291269
Bind a specific {package} to a {path} so that the
12301270
|gettext()| function can be used to get language-specific
@@ -1857,10 +1897,15 @@ complete_info([{what}]) *complete_info()*
18571897
See |complete_info_mode| for the values.
18581898
pum_visible |TRUE| if popup menu is visible.
18591899
See |pumvisible()|.
1860-
items List of completion matches. Each item is a
1861-
dictionary containing the entries "word",
1900+
items List of all completion candidates. Each item
1901+
is a dictionary containing the entries "word",
18621902
"abbr", "menu", "kind", "info" and "user_data".
18631903
See |complete-items|.
1904+
matches Same as "items", but only returns items that
1905+
are matching current query. If both "matches"
1906+
and "items" are in "what", the returned list
1907+
will still be named "items", but each item
1908+
will have an additional "match" field.
18641909
selected Selected item index. First index is zero.
18651910
Index is -1 if no item is selected (showing
18661911
typed text only, or the last completion after
@@ -4953,6 +4998,21 @@ getscriptinfo([{opts}]) *getscriptinfo()*
49534998
Return type: list<dict<any>>
49544999

49555000

5001+
getstacktrace() *getstacktrace()*
5002+
Returns the current stack trace of Vim scripts.
5003+
Stack trace is a |List|, of which each item is a |Dictionary|
5004+
with the following items:
5005+
funcref The funcref if the stack is at the function,
5006+
otherwise this item is not exist.
5007+
event The string of the event description if the
5008+
stack is at autocmd event, otherwise this item
5009+
is not exist.
5010+
lnum The line number of the script on the stack.
5011+
filepath The file path of the script on the stack.
5012+
5013+
Return type: list<dict<any>>
5014+
5015+
49565016
gettabinfo([{tabnr}]) *gettabinfo()*
49575017
If {tabnr} is not specified, then information about all the
49585018
tab pages is returned as a |List|. Each List item is a

0 commit comments

Comments
 (0)