docs(builtin): fix some missing lines (#24759)

Some things got chopped off in the PR that removed method syntax examples.
These were all that I found.
This commit is contained in:
Sean Dewar
2023-08-17 16:38:56 +01:00
committed by GitHub
parent de6b58f659
commit 88887a7be7
3 changed files with 24 additions and 0 deletions

View File

@@ -429,6 +429,8 @@ bufname([{buf}]) *bufname()*
with a listed buffer, that one is returned. Next unlisted with a listed buffer, that one is returned. Next unlisted
buffers are searched for. buffers are searched for.
If the {buf} is a String, but you want to use it as a buffer If the {buf} is a String, but you want to use it as a buffer
number, force it to be a Number by adding zero to it: >vim
echo bufname("3" + 0)
< If the buffer doesn't exist, or doesn't have a name, an empty < If the buffer doesn't exist, or doesn't have a name, an empty
string is returned. >vim string is returned. >vim
echo bufname("#") " alternate buffer name echo bufname("#") " alternate buffer name
@@ -3676,6 +3678,9 @@ interrupt() *interrupt()*
invert({expr}) *invert()* invert({expr}) *invert()*
Bitwise invert. The argument is converted to a number. A Bitwise invert. The argument is converted to a number. A
List, Dict or Float argument causes an error. Example: >vim
let bits = invert(bits)
<
isdirectory({directory}) *isdirectory()* isdirectory({directory}) *isdirectory()*
The result is a Number, which is |TRUE| when a directory The result is a Number, which is |TRUE| when a directory
@@ -5665,6 +5670,9 @@ reverse({object}) *reverse()*
{object} can be a |List| or a |Blob|. {object} can be a |List| or a |Blob|.
Returns {object}. Returns {object}.
Returns zero if {object} is not a List or a Blob. Returns zero if {object} is not a List or a Blob.
If you want an object to remain unmodified make a copy first: >vim
let revlist = reverse(copy(mylist))
<
round({expr}) *round()* round({expr}) *round()*
Round off {expr} to the nearest integral value and return it Round off {expr} to the nearest integral value and return it

View File

@@ -570,6 +570,8 @@ function vim.fn.bufloaded(buf) end
--- with a listed buffer, that one is returned. Next unlisted --- with a listed buffer, that one is returned. Next unlisted
--- buffers are searched for. --- buffers are searched for.
--- If the {buf} is a String, but you want to use it as a buffer --- If the {buf} is a String, but you want to use it as a buffer
--- number, force it to be a Number by adding zero to it: >vim
--- echo bufname("3" + 0)
--- <If the buffer doesn't exist, or doesn't have a name, an empty --- <If the buffer doesn't exist, or doesn't have a name, an empty
--- string is returned. >vim --- string is returned. >vim
--- echo bufname("#") " alternate buffer name --- echo bufname("#") " alternate buffer name
@@ -4426,6 +4428,9 @@ function vim.fn.insert(object, item, idx) end
function vim.fn.interrupt() end function vim.fn.interrupt() end
--- Bitwise invert. The argument is converted to a number. A --- Bitwise invert. The argument is converted to a number. A
--- List, Dict or Float argument causes an error. Example: >vim
--- let bits = invert(bits)
--- <
--- ---
--- @param expr any --- @param expr any
--- @return any --- @return any
@@ -6761,6 +6766,9 @@ function vim.fn.resolve(filename) end
--- {object} can be a |List| or a |Blob|. --- {object} can be a |List| or a |Blob|.
--- Returns {object}. --- Returns {object}.
--- Returns zero if {object} is not a List or a Blob. --- Returns zero if {object} is not a List or a Blob.
--- If you want an object to remain unmodified make a copy first: >vim
--- let revlist = reverse(copy(mylist))
--- <
--- ---
--- @param object any --- @param object any
--- @return any --- @return any

View File

@@ -796,6 +796,8 @@ M.funcs = {
with a listed buffer, that one is returned. Next unlisted with a listed buffer, that one is returned. Next unlisted
buffers are searched for. buffers are searched for.
If the {buf} is a String, but you want to use it as a buffer If the {buf} is a String, but you want to use it as a buffer
number, force it to be a Number by adding zero to it: >vim
echo bufname("3" + 0)
<If the buffer doesn't exist, or doesn't have a name, an empty <If the buffer doesn't exist, or doesn't have a name, an empty
string is returned. >vim string is returned. >vim
echo bufname("#") " alternate buffer name echo bufname("#") " alternate buffer name
@@ -5413,6 +5415,9 @@ M.funcs = {
base = 1, base = 1,
desc = [=[ desc = [=[
Bitwise invert. The argument is converted to a number. A Bitwise invert. The argument is converted to a number. A
List, Dict or Float argument causes an error. Example: >vim
let bits = invert(bits)
<
]=], ]=],
name = 'invert', name = 'invert',
params = { { 'expr', 'any' } }, params = { { 'expr', 'any' } },
@@ -8150,6 +8155,9 @@ M.funcs = {
{object} can be a |List| or a |Blob|. {object} can be a |List| or a |Blob|.
Returns {object}. Returns {object}.
Returns zero if {object} is not a List or a Blob. Returns zero if {object} is not a List or a Blob.
If you want an object to remain unmodified make a copy first: >vim
let revlist = reverse(copy(mylist))
<
]=], ]=],
name = 'reverse', name = 'reverse',
params = { { 'object', 'any' } }, params = { { 'object', 'any' } },