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)
345345islocked({expr} ) Number | TRUE | if {expr} is locked
346346isnan({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}
348348job_getchannel({job} ) Channel get the channel handle for {job}
349349job_info([{job} ]) Dict get information about {job}
350350job_setoptions({job} , {options} ) none set options for {job}
@@ -747,6 +747,8 @@ undofile({name}) String undo file name for {name}
747747undotree([{buf} ]) List undo file tree for buffer {buf}
748748uniq({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
750752utf16idx({string} , {idx} [, {countcc} [, {charidx} ]])
751753 Number UTF-16 index of byte {idx} in {string}
752754values({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
76287632menu_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
77207724mkdir({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()*
1218912246utf16idx({string} , {idx} [, {countcc} [, {charidx} ]])
1219012247 Same as | charidx() | but returns the UTF-16 code unit index of
0 commit comments