Skip to content

Commit 5b45249

Browse files
authored
Merge pull request #2264 from h-east/update-builtin
Update builtin.{txt,jax}
2 parents c0a46ae + 835d982 commit 5b45249

File tree

2 files changed

+158
-26
lines changed

2 files changed

+158
-26
lines changed

doc/builtin.jax

Lines changed: 80 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Aug 12
1+
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Aug 24
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -368,7 +368,8 @@ isinf({expr}) 数値 {expr}が無限大の値(正または負)かどうか
368368
を判定する
369369
islocked({expr}) 数値 {expr}がロックされているなら|TRUE|
370370
isnan({expr}) 数値 {expr}がNaNならば|TRUE|
371-
items({dict}) リスト {dict}のキーと値のペアを取得
371+
items({expr}) リスト {expr} のキーとインデックス値のペアを
372+
取得
372373
job_getchannel({job}) チャネル {job}のチャネルハンドルを取得
373374
job_info([{job}]) 辞書 {job}についての情報を取得
374375
job_setoptions({job}, {options}) なし {job}のオプションを設定する
@@ -814,6 +815,8 @@ undofile({name}) 文字列 {name}に対するアンドゥファイルの名前
814815
undotree([{buf}]) リスト バッファ {buf} のアンドゥファイルツリー
815816
uniq({list} [, {func} [, {dict}]])
816817
リスト リストから隣接した重複を削除
818+
uri_decode({string}) 文字列 文字列を URI デコードする
819+
uri_encode({string}) 文字列 文字列を URI エンコードする
817820
utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
818821
数値 {string} のバイト {idx} の UTF-16 イン
819822
デックス
@@ -6240,19 +6243,31 @@ isnan({expr}) *isnan()*
62406243
戻り値の型: |Number|
62416244

62426245

6243-
items({dict}) *items()*
6244-
{dict}の全要素のキー・値のペアからなるリストを返す。戻り値の各
6246+
items({expr}) *items()*
6247+
{expr} の全要素のキー・値のペアからなるリストを返す。戻り値の各
62456248
要素はリストであり、キーと値の2個の要素を持つ。戻り値のリスト
62466249
の要素の順序は不定である。|keys()| と |values()| も参照。
6250+
6251+
{expr} のすべてのキー/インデックスと値のペアを含む |List| を返
6252+
す。各 |List| の項目は 2 つの項目を持つリストである。
6253+
- |Dict| の場合: キーと値
6254+
- |List|、|Tuple|、|Blob| または |String| の場合: インデックス
6255+
と値
6256+
返される |List| は、|Dict| の場合は任意の順序で返されるが、そ
6257+
れ以外の場合はインデックスの昇順になる。
6258+
6259+
|keys()| および |values()| も参照。
6260+
62476261
例: >
6262+
let mydict = #{a: 'red', b: 'blue'}
62486263
for [key, value] in items(mydict)
6249-
echo key .. ': ' .. value
6264+
echo $"{key} = {value}"
62506265
endfor
6266+
echo items([1, 2, 3])
6267+
echo items(('a', 'b', 'c'))
6268+
echo items("foobar")
6269+
echo items(0z0102)
62516270
<
6252-
|List|、|Tuple| または |String| 引数もサポートされている。こ
6253-
のようなケースでは、items() はインデックスとインデックスの値
6254-
を含むリストを返す。
6255-
62566271
|method| としても使用できる: >
62576272
mydict->items()
62586273
<
@@ -7508,7 +7523,7 @@ max({expr}) *max()*
75087523
|method| としても使用できる: >
75097524
mylist->max()
75107525
<
7511-
戻り値の型: |Number|
7526+
戻り値の型: any。{expr} による
75127527

75137528

75147529
menu_info({name} [, {mode}]) *menu_info()*
@@ -7599,7 +7614,7 @@ min({expr}) *min()*
75997614
|method| としても使用できる: >
76007615
mylist->min()
76017616
<
7602-
戻り値の型: |Number|
7617+
戻り値の型: any。{expr} による
76037618

76047619

76057620
mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E739*
@@ -11925,6 +11940,58 @@ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882*
1192511940
戻り値の型: list<{type}>
1192611941

1192711942

11943+
uri_decode({string}) *uri_decode()*
11944+
パーセントエンコーディングを逆にして、{string} の URI デコード
11945+
形式を返す ("%3D" のようなシーケンスを対応する文字に戻す)。
11946+
11947+
デコードは標準のパーセントデコードルールに従う:
11948+
- "%HH" は 16 進数値 HH の文字に置き換えられる。
11949+
- デコードされたバイトが有効な UTF-8 を形成する場合、対応
11950+
する文字に結合される。それ以外の場合、バイトはそのまま保
11951+
持される。
11952+
- 無効または不完全なエンコーディング (例:"%GZ"、"%3"、末
11953+
尾の "%") は変更されない。
11954+
11955+
{string} が空の場合、空の文字列を返す。
11956+
11957+
例: >
11958+
:echo uri_decode('c%3A%5Cmy%5Cdir%5Cfoo%20bar')
11959+
c:\my\dir\foo bar
11960+
:echo uri_decode('%CE%B1%CE%B2%CE%B3')
11961+
αβγ
11962+
<
11963+
|method| としても使用できる: >
11964+
mystr->uri_decode()
11965+
<
11966+
戻り値の型: |String|
11967+
11968+
uri_encode({string}) *uri_encode()*
11969+
{string} の URI エンコード形式を返す。URI エンコードでは、安全
11970+
でない文字や予約文字がパーセントエンコードされたシーケンスに置
11971+
き換えられる。
11972+
11973+
エンコーディングは標準のパーセントエンコーディングルールに従
11974+
う。
11975+
- 英数字 [0-9A-Za-z] は変更されない。
11976+
- 文字 "-"、"_"、"." および "~" も変更されない。
11977+
- その他の文字はすべて "%HH" に置き換えられる。HH は 2 桁
11978+
の大文字の 16 進数値である。
11979+
- 既存のパーセントエンコードされたシーケンスは変更されな
11980+
い。
11981+
11982+
{string} が空の場合、空の文字列を返す。
11983+
11984+
例: >
11985+
:echo uri_encode('c:\my\dir\foo bar')
11986+
c%3A%5Cmy%5Cdir%5Cfoo%20bar
11987+
:echo uri_encode('key=value&name=αβγ')
11988+
key%3Dvalue%26name%3D%CE%B1%CE%B2%CE%B3
11989+
<
11990+
|method| としても使用できる: >
11991+
mystr->uri_encode()
11992+
<
11993+
戻り値の型: |String|
11994+
1192811995
*utf16idx()*
1192911996
utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
1193011997
|charidx()| と同じだが、{string} の {idx} にあるバイトの
@@ -12769,6 +12836,8 @@ scrollbind 'scrollbind' をサポート (常に true)
1276912836
showcmd 'showcmd' をサポート
1277012837
signs |:sign|をサポート
1277112838
smartindent 'smartindent' をサポート。(常に true)
12839+
socketserver ソケットサーバー機能付きでコンパイルされている。(Unix
12840+
のみ)
1277212841
sodium libsodium ライブラリによるより良い暗号のサポート
1277312842
sound サウンド再生をサポート。例えば、`sound_playevent()`
1277412843
spell スペルチェックをサポート |spell|

en/builtin.txt

Lines changed: 78 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.1. Last change: 2025 Aug 12
1+
*builtin.txt* For Vim version 9.1. Last change: 2025 Aug 24
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -344,7 +344,7 @@ isinf({expr}) Number determine if {expr} is infinity value
344344
(positive or negative)
345345
islocked({expr}) Number |TRUE| if {expr} is locked
346346
isnan({expr}) Number |TRUE| if {expr} is NaN
347-
items({dict}) List key-value pairs in {dict}
347+
items({expr}) List key/index-value pairs in {expr}
348348
job_getchannel({job}) Channel get the channel handle for {job}
349349
job_info([{job}]) Dict get information about {job}
350350
job_setoptions({job}, {options}) none set options for {job}
@@ -747,6 +747,8 @@ undofile({name}) String undo file name for {name}
747747
undotree([{buf}]) List undo file tree for buffer {buf}
748748
uniq({list} [, {func} [, {dict}]])
749749
List remove adjacent duplicates from a list
750+
uri_decode({string}) String URI-decode a string
751+
uri_encode({string}) String URI-encode a string
750752
utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
751753
Number UTF-16 index of byte {idx} in {string}
752754
values({dict}) List values in {dict}
@@ -6310,20 +6312,27 @@ isnan({expr}) *isnan()*
63106312
Return type: |Number|
63116313

63126314

6313-
items({dict}) *items()*
6314-
Return a |List| with all the key-value pairs of {dict}. Each
6315-
|List| item is a list with two items: the key of a {dict}
6316-
entry and the value of this entry. The |List| is in arbitrary
6317-
order. Also see |keys()| and |values()|.
6318-
Example: >
6315+
items({expr}) *items()*
6316+
Return a |List| with all key/index and value pairs of {expr}.
6317+
Each |List| item is a list with two items:
6318+
- for a |Dict|: the key and the value
6319+
- for a |List|, |Tuple|, |Blob| or |String|: the index and the
6320+
value
6321+
The returned |List| is in arbitrary order for a |Dict|,
6322+
otherwise it's in ascending order of the index.
6323+
6324+
Also see |keys()| and |values()|.
6325+
6326+
Examples: >
6327+
let mydict = #{a: 'red', b: 'blue'}
63196328
for [key, value] in items(mydict)
6320-
echo key .. ': ' .. value
6329+
echo $"{key} = {value}"
63216330
endfor
6331+
echo items([1, 2, 3])
6332+
echo items(('a', 'b', 'c'))
6333+
echo items("foobar")
6334+
echo items(0z0102)
63226335
<
6323-
A |List|, a |Tuple| or a |String| argument is also supported.
6324-
In these cases, items() returns a List with the index and the
6325-
value at the index.
6326-
63276336
Can also be used as a |method|: >
63286337
mydict->items()
63296338
<
@@ -7617,7 +7626,7 @@ max({expr}) *max()*
76177626
Can also be used as a |method|: >
76187627
mylist->max()
76197628
<
7620-
Return type: |Number|
7629+
Return type: any, depending on {expr}
76217630

76227631

76237632
menu_info({name} [, {mode}]) *menu_info()*
@@ -7709,7 +7718,7 @@ min({expr}) *min()*
77097718
Can also be used as a |method|: >
77107719
mylist->min()
77117720
<
7712-
Return type: |Number|
7721+
Return type: any, depending on {expr}
77137722

77147723

77157724
mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E739*
@@ -12180,6 +12189,59 @@ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882*
1218012189
Return type: list<{type}>
1218112190

1218212191

12192+
uri_decode({string}) *uri_decode()*
12193+
Returns the URI-decoded form of {string}, reversing
12194+
percent-encoding (converting sequences like "%3D" back to
12195+
the corresponding character).
12196+
12197+
The decoding follows standard percent-decoding rules:
12198+
- "%HH" is replaced with the character for the hex value
12199+
HH.
12200+
- If the decoded bytes form valid UTF-8, they are combined
12201+
into the corresponding character(s). Otherwise, the
12202+
bytes are kept as-is.
12203+
- Invalid or incomplete encodings (e.g. "%GZ", "%3", or a
12204+
trailing "%") are left unchanged.
12205+
12206+
Returns an empty String if {string} is empty.
12207+
12208+
Example: >
12209+
:echo uri_decode('c%3A%5Cmy%5Cdir%5Cfoo%20bar')
12210+
c:\my\dir\foo bar
12211+
:echo uri_decode('%CE%B1%CE%B2%CE%B3')
12212+
αβγ
12213+
<
12214+
Can also be used as a |method|: >
12215+
mystr->uri_decode()
12216+
<
12217+
Return type: |String|
12218+
12219+
uri_encode({string}) *uri_encode()*
12220+
Returns the URI-encoded form of {string}. URI encoding
12221+
replaces unsafe or reserved characters with percent-encoded
12222+
sequences.
12223+
12224+
The encoding follows standard percent-encoding rules:
12225+
- Alphanumeric characters [0-9A-Za-z] remain unchanged.
12226+
- The characters "-", "_", ".", and "~" also remain
12227+
unchanged.
12228+
- All other characters are replaced with "%HH", where HH
12229+
is the two-digit uppercase hexadecimal value.
12230+
- Existing percent-encoded sequences are not modified.
12231+
12232+
Returns an empty String if {string} is empty.
12233+
12234+
Example: >
12235+
:echo uri_encode('c:\my\dir\foo bar')
12236+
c%3A%5Cmy%5Cdir%5Cfoo%20bar
12237+
:echo uri_encode('key=value&name=αβγ')
12238+
key%3Dvalue%26name%3D%CE%B1%CE%B2%CE%B3
12239+
<
12240+
Can also be used as a |method|: >
12241+
mystr->uri_encode()
12242+
<
12243+
Return type: |String|
12244+
1218312245
*utf16idx()*
1218412246
utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
1218512247
Same as |charidx()| but returns the UTF-16 code unit index of
@@ -13042,6 +13104,7 @@ scrollbind Compiled with 'scrollbind' support. (always true)
1304213104
showcmd Compiled with 'showcmd' support.
1304313105
signs Compiled with |:sign| support.
1304413106
smartindent Compiled with 'smartindent' support. (always true)
13107+
socketserver Compiled with socket server functionality. (Unix only)
1304513108
sodium Compiled with libsodium for better crypt support
1304613109
sound Compiled with sound support, e.g. `sound_playevent()`
1304713110
spell Compiled with spell checking support |spell|.

0 commit comments

Comments
 (0)