Skip to content

Commit fad026d

Browse files
committed
Update by original
1 parent c97d0bd commit fad026d

File tree

2 files changed

+124
-10
lines changed

2 files changed

+124
-10
lines changed

doc/builtin.jax

Lines changed: 62 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim バージョン 9.1. Last change: 2025 Aug 20
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({expr}) リスト {expr} のキーと値のペアを取得
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
デックス
@@ -6248,7 +6251,8 @@ items({expr}) *items()*
62486251
{expr} のすべてのキー/インデックスと値のペアを含む |List| を返
62496252
す。各 |List| の項目は 2 つの項目を持つリストである。
62506253
- |Dict| の場合: キーと値
6251-
- |List|、|Tuple| または |String| の場合: インデックスと値
6254+
- |List|、|Tuple|、|Blob| または |String| の場合: インデックス
6255+
と値
62526256
返される |List| は、|Dict| の場合は任意の順序で返されるが、そ
62536257
れ以外の場合はインデックスの昇順になる。
62546258

@@ -6262,6 +6266,7 @@ items({expr}) *items()*
62626266
echo items([1, 2, 3])
62636267
echo items(('a', 'b', 'c'))
62646268
echo items("foobar")
6269+
echo items(0z0102)
62656270
<
62666271
|method| としても使用できる: >
62676272
mydict->items()
@@ -7518,7 +7523,7 @@ max({expr}) *max()*
75187523
|method| としても使用できる: >
75197524
mylist->max()
75207525
<
7521-
戻り値の型: |Number|
7526+
戻り値の型: any。{expr} による
75227527

75237528

75247529
menu_info({name} [, {mode}]) *menu_info()*
@@ -7609,7 +7614,7 @@ min({expr}) *min()*
76097614
|method| としても使用できる: >
76107615
mylist->min()
76117616
<
7612-
戻り値の型: |Number|
7617+
戻り値の型: any。{expr} による
76137618

76147619

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

1193711942

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+
戻り値の型: |Number|
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+
1193811995
*utf16idx()*
1193911996
utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
1194011997
|charidx()| と同じだが、{string} の {idx} にあるバイトの

en/builtin.txt

Lines changed: 62 additions & 5 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 20
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({expr}) List key-value pairs in {expr}
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}
@@ -6314,7 +6316,8 @@ items({expr}) *items()*
63146316
Return a |List| with all key/index and value pairs of {expr}.
63156317
Each |List| item is a list with two items:
63166318
- for a |Dict|: the key and the value
6317-
- for a |List|, |Tuple| or |String|: the index and the value
6319+
- for a |List|, |Tuple|, |Blob| or |String|: the index and the
6320+
value
63186321
The returned |List| is in arbitrary order for a |Dict|,
63196322
otherwise it's in ascending order of the index.
63206323

@@ -6328,6 +6331,7 @@ items({expr}) *items()*
63286331
echo items([1, 2, 3])
63296332
echo items(('a', 'b', 'c'))
63306333
echo items("foobar")
6334+
echo items(0z0102)
63316335
<
63326336
Can also be used as a |method|: >
63336337
mydict->items()
@@ -7622,7 +7626,7 @@ max({expr}) *max()*
76227626
Can also be used as a |method|: >
76237627
mylist->max()
76247628
<
7625-
Return type: |Number|
7629+
Return type: any, depending on {expr}
76267630

76277631

76287632
menu_info({name} [, {mode}]) *menu_info()*
@@ -7714,7 +7718,7 @@ min({expr}) *min()*
77147718
Can also be used as a |method|: >
77157719
mylist->min()
77167720
<
7717-
Return type: |Number|
7721+
Return type: any, depending on {expr}
77187722

77197723

77207724
mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E739*
@@ -12185,6 +12189,59 @@ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882*
1218512189
Return type: list<{type}>
1218612190

1218712191

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+
1218812245
*utf16idx()*
1218912246
utf16idx({string}, {idx} [, {countcc} [, {charidx}]])
1219012247
Same as |charidx()| but returns the UTF-16 code unit index of

0 commit comments

Comments
 (0)