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
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -344,7 +344,7 @@ isinf({expr}) Number determine if {expr} is infinity value
344
344
(positive or negative)
345
345
islocked({expr} ) Number | TRUE | if {expr} is locked
346
346
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}
348
348
job_getchannel({job} ) Channel get the channel handle for {job}
349
349
job_info([{job} ]) Dict get information about {job}
350
350
job_setoptions({job} , {options} ) none set options for {job}
@@ -747,6 +747,8 @@ undofile({name}) String undo file name for {name}
747
747
undotree([{buf} ]) List undo file tree for buffer {buf}
748
748
uniq({list} [, {func} [, {dict} ]])
749
749
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
750
752
utf16idx({string} , {idx} [, {countcc} [, {charidx} ]])
751
753
Number UTF-16 index of byte {idx} in {string}
752
754
values({dict} ) List values in {dict}
@@ -6314,7 +6316,8 @@ items({expr}) *items()*
6314
6316
Return a | List | with all key/index and value pairs of {expr} .
6315
6317
Each | List | item is a list with two items:
6316
6318
- 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
6318
6321
The returned | List | is in arbitrary order for a | Dict | ,
6319
6322
otherwise it's in ascending order of the index.
6320
6323
@@ -6328,6 +6331,7 @@ items({expr}) *items()*
6328
6331
echo items([1, 2, 3])
6329
6332
echo items(('a', 'b', 'c'))
6330
6333
echo items("foobar")
6334
+ echo items(0z0102)
6331
6335
<
6332
6336
Can also be used as a | method | : >
6333
6337
mydict->items()
@@ -7622,7 +7626,7 @@ max({expr}) *max()*
7622
7626
Can also be used as a | method | : >
7623
7627
mylist->max()
7624
7628
<
7625
- Return type: | Number |
7629
+ Return type: any, depending on {expr}
7626
7630
7627
7631
7628
7632
menu_info({name} [, {mode} ]) *menu_info()*
@@ -7714,7 +7718,7 @@ min({expr}) *min()*
7714
7718
Can also be used as a | method | : >
7715
7719
mylist->min()
7716
7720
<
7717
- Return type: | Number |
7721
+ Return type: any, depending on {expr}
7718
7722
7719
7723
7720
7724
mkdir({name} [, {flags} [, {prot} ]]) *mkdir()* *E739*
@@ -12185,6 +12189,59 @@ uniq({list} [, {func} [, {dict}]]) *uniq()* *E882*
12185
12189
Return type: list<{type} >
12186
12190
12187
12191
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
+
12188
12245
*utf16idx()*
12189
12246
utf16idx({string} , {idx} [, {countcc} [, {charidx} ]])
12190
12247
Same as | charidx() | but returns the UTF-16 code unit index of
0 commit comments