comparison runtime/doc/eval.txt @ 19099:1a951a4beee3

Update runtime files. Commit: https://github.com/vim/vim/commit/2963456ff2b740244b3a064785fe681b1998d75e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jan 9 21:46:04 2020 +0100 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Thu, 09 Jan 2020 22:00:05 +0100
parents d20ed2e5a776
children 63beef1ca62c
comparison
equal deleted inserted replaced
19098:254834ce268e 19099:1a951a4beee3
1 *eval.txt* For Vim version 8.2. Last change: 2020 Jan 02 1 *eval.txt* For Vim version 8.2. Last change: 2020 Jan 06
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
3045 the whole |arglist| is returned. 3045 the whole |arglist| is returned.
3046 3046
3047 The {winid} argument specifies the window ID, see |argc()|. 3047 The {winid} argument specifies the window ID, see |argc()|.
3048 For the Vim command line arguments see |v:argv|. 3048 For the Vim command line arguments see |v:argv|.
3049 3049
3050
3051 assert_ functions are documented here: |assert-functions-details|
3052
3053
3054 asin({expr}) *asin()* 3050 asin({expr}) *asin()*
3055 Return the arc sine of {expr} measured in radians, as a |Float| 3051 Return the arc sine of {expr} measured in radians, as a |Float|
3056 in the range of [-pi/2, pi/2]. 3052 in the range of [-pi/2, pi/2].
3057 {expr} must evaluate to a |Float| or a |Number| in the range 3053 {expr} must evaluate to a |Float| or a |Number| in the range
3058 [-1, 1]. 3054 [-1, 1].
3064 3060
3065 Can also be used as a |method|: > 3061 Can also be used as a |method|: >
3066 Compute()->asin() 3062 Compute()->asin()
3067 < 3063 <
3068 {only available when compiled with the |+float| feature} 3064 {only available when compiled with the |+float| feature}
3065
3066
3067 assert_ functions are documented here: |assert-functions-details|
3068
3069 3069
3070 3070
3071 atan({expr}) *atan()* 3071 atan({expr}) *atan()*
3072 Return the principal value of the arc tangent of {expr}, in 3072 Return the principal value of the arc tangent of {expr}, in
3073 the range [-pi/2, +pi/2] radians, as a |Float|. 3073 the range [-pi/2, +pi/2] radians, as a |Float|.
3933 The highlight ID can be used with |synIDattr()| to obtain 3933 The highlight ID can be used with |synIDattr()| to obtain
3934 syntax information about the highlighting. 3934 syntax information about the highlighting.
3935 3935
3936 Can also be used as a |method|: > 3936 Can also be used as a |method|: >
3937 GetLnum()->diff_hlID(col) 3937 GetLnum()->diff_hlID(col)
3938 environ() *environ()*
3939 Return all of environment variables as dictionary. You can
3940 check if an environment variable exists like this: >
3941 :echo has_key(environ(), 'HOME')
3942 < Note that the variable name may be CamelCase; to ignore case
3943 use this: >
3944 :echo index(keys(environ()), 'HOME', 0, 1) != -1
3945 3938
3946 empty({expr}) *empty()* 3939 empty({expr}) *empty()*
3947 Return the Number 1 if {expr} is empty, zero otherwise. 3940 Return the Number 1 if {expr} is empty, zero otherwise.
3948 - A |List| or |Dictionary| is empty when it does not have any 3941 - A |List| or |Dictionary| is empty when it does not have any
3949 items. 3942 items.
3957 For a long |List| this is much faster than comparing the 3950 For a long |List| this is much faster than comparing the
3958 length with zero. 3951 length with zero.
3959 3952
3960 Can also be used as a |method|: > 3953 Can also be used as a |method|: >
3961 mylist->empty() 3954 mylist->empty()
3955
3956 environ() *environ()*
3957 Return all of environment variables as dictionary. You can
3958 check if an environment variable exists like this: >
3959 :echo has_key(environ(), 'HOME')
3960 < Note that the variable name may be CamelCase; to ignore case
3961 use this: >
3962 :echo index(keys(environ()), 'HOME', 0, 1) != -1
3962 3963
3963 escape({string}, {chars}) *escape()* 3964 escape({string}, {chars}) *escape()*
3964 Escape the characters in {chars} that occur in {string} with a 3965 Escape the characters in {chars} that occur in {string} with a
3965 backslash. Example: > 3966 backslash. Example: >
3966 :echo escape('c:\program files\vim', ' \') 3967 :echo escape('c:\program files\vim', ' \')
7082 Can also be used as a |method|: > 7083 Can also be used as a |method|: >
7083 GetText()->matchstrpos('word') 7084 GetText()->matchstrpos('word')
7084 < 7085 <
7085 *max()* 7086 *max()*
7086 max({expr}) Return the maximum value of all items in {expr}. 7087 max({expr}) Return the maximum value of all items in {expr}.
7087 {expr} can be a list or a dictionary. For a dictionary, 7088 {expr} can be a List or a Dictionary. For a Dictionary,
7088 it returns the maximum of all values in the dictionary. 7089 it returns the maximum of all values in the Dictionary.
7089 If {expr} is neither a list nor a dictionary, or one of the 7090 If {expr} is neither a List nor a Dictionary, or one of the
7090 items in {expr} cannot be used as a Number this results in 7091 items in {expr} cannot be used as a Number this results in
7091 an error. An empty |List| or |Dictionary| results in zero. 7092 an error. An empty |List| or |Dictionary| results in zero.
7092 7093
7093 Can also be used as a |method|: > 7094 Can also be used as a |method|: >
7094 mylist->max() 7095 mylist->max()
7095 7096
7096 < *min()* 7097 < *min()*
7097 min({expr}) Return the minimum value of all items in {expr}. 7098 min({expr}) Return the minimum value of all items in {expr}.
7098 {expr} can be a list or a dictionary. For a dictionary, 7099 {expr} can be a List or a Dictionary. For a Dictionary,
7099 it returns the minimum of all values in the dictionary. 7100 it returns the minimum of all values in the Dictionary.
7100 If {expr} is neither a list nor a dictionary, or one of the 7101 If {expr} is neither a List nor a Dictionary, or one of the
7101 items in {expr} cannot be used as a Number this results in 7102 items in {expr} cannot be used as a Number this results in
7102 an error. An empty |List| or |Dictionary| results in zero. 7103 an error. An empty |List| or |Dictionary| results in zero.
7103 7104
7104 Can also be used as a |method|: > 7105 Can also be used as a |method|: >
7105 mylist->min() 7106 mylist->min()
10358 This is similar to moving to {target}, creating a new window 10359 This is similar to moving to {target}, creating a new window
10359 using |:split| but having the same contents as window {nr}, and 10360 using |:split| but having the same contents as window {nr}, and
10360 then closing {nr}. 10361 then closing {nr}.
10361 10362
10362 Both {nr} and {target} can be window numbers or |window-ID|s. 10363 Both {nr} and {target} can be window numbers or |window-ID|s.
10364 Both must be in the current tab page.
10363 10365
10364 Returns zero for success, non-zero for failure. 10366 Returns zero for success, non-zero for failure.
10365 10367
10366 {options} is a Dictionary with the following optional entries: 10368 {options} is a Dictionary with the following optional entries:
10367 "vertical" When TRUE, the split is created vertically, 10369 "vertical" When TRUE, the split is created vertically,