list. See |arglist|.
Returns -1 if the arguments are invalid.
Without arguments use the current window.
With {winnr} only use this window in the current tab page.
With {winnr} and {tabnr} use the window in the specified tab
page.
{winnr} can be the window number or the |window-ID|.
Parameters: ~
• {winnr} (`integer?`)
• {tabnr} (`integer?`)
Return: ~
(`integer`)
argv([{nr} [, {winid}]]) *argv()*
The result is the {nr}th file in the argument list. See
|arglist|. "argv(0)" is the first one. Example: >vim
let i = 0
while i < argc()
let f = escape(fnameescape(argv(i)), '.')
exe 'amenu Arg.' .. f .. ' :e ' .. f .. '<CR>'
let i = i + 1
endwhile
< Without the {nr} argument, or when {nr} is -1, a |List| with
the whole |arglist| is returned.
The {winid} argument specifies the window ID, see |argc()|.
For the Vim command line arguments see |v:argv|.
Returns an empty string if {nr}th argument is not present in
the argument list. Returns an empty List if the {winid}
argument is invalid.
Parameters: ~
• {nr} (`integer?`)
• {winid} (`integer?`)
Return: ~
(`string|string[]`)
asin({expr}) *asin()*
Return the arc sine of {expr} measured in radians, as a |Float|
in the range of [-pi/2, pi/2].
{expr} must evaluate to a |Float| or a |Number| in the range
[-1, 1].
Returns NaN if {expr} is outside the range [-1, 1]. Returns
0.0 if {expr} is not a |Float| or a |Number|.
Examples: >vim
echo asin(0.8)
< 0.927295 >vim
echo asin(-0.5)
< -0.523599
Parameters: ~
• {expr} (`any`)
Return: ~
(`number`)
assert_beeps({cmd}) *assert_beeps()*
Run {cmd} and add an error message to |v:errors| if it does
NOT produce a beep or visual bell.
Also see |assert_fails()|, |assert_nobeep()| and
|assert-return|.
Parameters: ~
• {cmd} (`string`)
Return: ~
(`0|1`)
assert_equal({expected}, {actual} [, {msg}]) *assert_equal()*
When {expected} and {actual} are not equal an error message is
added to |v:errors| and 1 is returned. Otherwise zero is
returned. |assert-return|
The error is in the form "Expected {expected} but got
{actual}". When {msg} is present it is prefixed to that,
along with the location of the assert when run from a script.
There is no automatic conversion, the String "4" is different
from the Number 4. And the number 4 is different from the
Float 4.0. The value of 'ignorecase' is not used here, case
always matters.
Example: >vim
call assert_equal('foo', 'bar', 'baz')
< Will add the following to |v:errors|:
test.vim line 12: baz: Expected 'foo' but got 'bar' ~
Parameters: ~
• {expected} (`any`)
• {actual} (`any`)
• {msg} (`any?`)
Return: ~
(`0|1`)
assert_equalfile({fname_one}, {fname_two}) *assert_equalfile()*
When the files {fname_one} and {fname_two} do not contain
exactly the same text an error message is added to |v:errors|.
Also see |assert-return|.
When {fname_one} or {fname_two} does not exist the error will
mention that.
Parameters: ~
• {fname_one} (`string`)
• {fname_two} (`string`)
Return: ~
(`0|1`)
assert_exception({error} [, {msg}]) *assert_exception()*
When v:exception does not contain the string {error} an error
message is added to |v:errors|. Also see |assert-return|.
This can be used to assert