comparison runtime/doc/eval.txt @ 20687:770a8e9c4781 v8.2.0897

patch 8.2.0897: list of functions in patched version is outdated Commit: https://github.com/vim/vim/commit/ebacddbc16b2d76bf5dad636d7ee5c529f0e8753 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Jun 4 15:22:21 2020 +0200 patch 8.2.0897: list of functions in patched version is outdated Problem: List of functions in patched version is outdated. Solution: Update the function lists only.
author Bram Moolenaar <Bram@vim.org>
date Thu, 04 Jun 2020 15:30:05 +0200
parents 1af1d8ff2aa8
children f4455c71a8aa
comparison
equal deleted inserted replaced
20686:0034b328ddde 20687:770a8e9c4781
1 *eval.txt* For Vim version 8.2. Last change: 2020 May 25 1 *eval.txt* For Vim version 8.2. Last change: 2020 Jun 03
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
2344 Number assert {exp} is not equal {act} 2344 Number assert {exp} is not equal {act}
2345 assert_notmatch({pat}, {text} [, {msg}]) 2345 assert_notmatch({pat}, {text} [, {msg}])
2346 Number assert {pat} not matches {text} 2346 Number assert {pat} not matches {text}
2347 assert_report({msg}) Number report a test failure 2347 assert_report({msg}) Number report a test failure
2348 assert_true({actual} [, {msg}]) Number assert {actual} is true 2348 assert_true({actual} [, {msg}]) Number assert {actual} is true
2349 asin({expr}) Float arc sine of {expr}
2350 atan({expr}) Float arc tangent of {expr} 2349 atan({expr}) Float arc tangent of {expr}
2351 atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2} 2350 atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2}
2352 balloon_gettext() String current text in the balloon 2351 balloon_gettext() String current text in the balloon
2353 balloon_show({expr}) none show {expr} inside the balloon 2352 balloon_show({expr}) none show {expr} inside the balloon
2354 balloon_split({msg}) List split {msg} as used for a balloon 2353 balloon_split({msg}) List split {msg} as used for a balloon
2435 eventhandler() Number |TRUE| if inside an event handler 2434 eventhandler() Number |TRUE| if inside an event handler
2436 executable({expr}) Number 1 if executable {expr} exists 2435 executable({expr}) Number 1 if executable {expr} exists
2437 execute({command}) String execute {command} and get the output 2436 execute({command}) String execute {command} and get the output
2438 exepath({expr}) String full path of the command {expr} 2437 exepath({expr}) String full path of the command {expr}
2439 exists({expr}) Number |TRUE| if {expr} exists 2438 exists({expr}) Number |TRUE| if {expr} exists
2440 extend({expr1}, {expr2} [, {expr3}])
2441 List/Dict insert items of {expr2} into {expr1}
2442 exp({expr}) Float exponential of {expr} 2439 exp({expr}) Float exponential of {expr}
2443 expand({expr} [, {nosuf} [, {list}]]) 2440 expand({expr} [, {nosuf} [, {list}]])
2444 any expand special keywords in {expr} 2441 any expand special keywords in {expr}
2445 expandcmd({expr}) String expand {expr} like with `:edit` 2442 expandcmd({expr}) String expand {expr} like with `:edit`
2443 extend({expr1}, {expr2} [, {expr3}])
2444 List/Dict insert items of {expr2} into {expr1}
2446 feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer 2445 feedkeys({string} [, {mode}]) Number add key sequence to typeahead buffer
2447 filereadable({file}) Number |TRUE| if {file} is a readable file 2446 filereadable({file}) Number |TRUE| if {file} is a readable file
2448 filewritable({file}) Number |TRUE| if {file} is a writable file 2447 filewritable({file}) Number |TRUE| if {file} is a writable file
2449 filter({expr1}, {expr2}) List/Dict remove items from {expr1} where 2448 filter({expr1}, {expr2}) List/Dict remove items from {expr1} where
2450 {expr2} is 0 2449 {expr2} is 0
2535 Number |TRUE| if mapping to {what} exists 2534 Number |TRUE| if mapping to {what} exists
2536 histadd({history}, {item}) Number add an item to a history 2535 histadd({history}, {item}) Number add an item to a history
2537 histdel({history} [, {item}]) Number remove an item from a history 2536 histdel({history} [, {item}]) Number remove an item from a history
2538 histget({history} [, {index}]) String get the item {index} from a history 2537 histget({history} [, {index}]) String get the item {index} from a history
2539 histnr({history}) Number highest index of a history 2538 histnr({history}) Number highest index of a history
2539 hlID({name}) Number syntax ID of highlight group {name}
2540 hlexists({name}) Number |TRUE| if highlight group {name} exists 2540 hlexists({name}) Number |TRUE| if highlight group {name} exists
2541 hlID({name}) Number syntax ID of highlight group {name}
2542 hostname() String name of the machine Vim is running on 2541 hostname() String name of the machine Vim is running on
2543 iconv({expr}, {from}, {to}) String convert encoding of {expr} 2542 iconv({expr}, {from}, {to}) String convert encoding of {expr}
2544 indent({lnum}) Number indent of line {lnum} 2543 indent({lnum}) Number indent of line {lnum}
2545 index({object}, {expr} [, {start} [, {ic}]]) 2544 index({object}, {expr} [, {start} [, {ic}]])
2546 Number index in {object} where {expr} appears 2545 Number index in {object} where {expr} appears
2636 popup_findinfo() Number get window ID of info popup window 2635 popup_findinfo() Number get window ID of info popup window
2637 popup_findpreview() Number get window ID of preview popup window 2636 popup_findpreview() Number get window ID of preview popup window
2638 popup_getoptions({id}) Dict get options of popup window {id} 2637 popup_getoptions({id}) Dict get options of popup window {id}
2639 popup_getpos({id}) Dict get position of popup window {id} 2638 popup_getpos({id}) Dict get position of popup window {id}
2640 popup_hide({id}) none hide popup menu {id} 2639 popup_hide({id}) none hide popup menu {id}
2641 popup_list() List get a list of window IDs of al popups 2640 popup_list() List get a list of window IDs of all popups
2642 popup_locate({row}, {col}) Number get window ID of popup at position 2641 popup_locate({row}, {col}) Number get window ID of popup at position
2643 popup_menu({what}, {options}) Number create a popup window used as a menu 2642 popup_menu({what}, {options}) Number create a popup window used as a menu
2644 popup_move({id}, {options}) none set position of popup window {id} 2643 popup_move({id}, {options}) none set position of popup window {id}
2645 popup_notification({what}, {options}) 2644 popup_notification({what}, {options})
2646 Number create a notification popup window 2645 Number create a notification popup window
2647 popup_show({id}) none unhide popup window {id}
2648 popup_setoptions({id}, {options}) 2646 popup_setoptions({id}, {options})
2649 none set options for popup window {id} 2647 none set options for popup window {id}
2650 popup_settext({id}, {text}) none set the text of popup window {id} 2648 popup_settext({id}, {text}) none set the text of popup window {id}
2649 popup_show({id}) none unhide popup window {id}
2651 pow({x}, {y}) Float {x} to the power of {y} 2650 pow({x}, {y}) Float {x} to the power of {y}
2652 prevnonblank({lnum}) Number line nr of non-blank line <= {lnum} 2651 prevnonblank({lnum}) Number line nr of non-blank line <= {lnum}
2653 printf({fmt}, {expr1}...) String format text 2652 printf({fmt}, {expr1}...) String format text
2654 prompt_setcallback({buf}, {expr}) none set prompt callback function 2653 prompt_setcallback({buf}, {expr}) none set prompt callback function
2655 prompt_setinterrupt({buf}, {text}) none set prompt interrupt function 2654 prompt_setinterrupt({buf}, {text}) none set prompt interrupt function
2670 prop_type_get([{name} [, {props}]]) 2669 prop_type_get([{name} [, {props}]])
2671 Dict get property type values 2670 Dict get property type values
2672 prop_type_list([{props}]) List get list of property types 2671 prop_type_list([{props}]) List get list of property types
2673 pum_getpos() Dict position and size of pum if visible 2672 pum_getpos() Dict position and size of pum if visible
2674 pumvisible() Number whether popup menu is visible 2673 pumvisible() Number whether popup menu is visible
2674 py3eval({expr}) any evaluate |python3| expression
2675 pyeval({expr}) any evaluate |Python| expression 2675 pyeval({expr}) any evaluate |Python| expression
2676 py3eval({expr}) any evaluate |python3| expression
2677 pyxeval({expr}) any evaluate |python_x| expression 2676 pyxeval({expr}) any evaluate |python_x| expression
2678 rand([{expr}]) Number get pseudo-random number 2677 rand([{expr}]) Number get pseudo-random number
2679 range({expr} [, {max} [, {stride}]]) 2678 range({expr} [, {max} [, {stride}]])
2680 List items from {expr} to {max} 2679 List items from {expr} to {max}
2681 readdir({dir} [, {expr}]) List file names in {dir} selected by {expr} 2680 readdir({dir} [, {expr}]) List file names in {dir} selected by {expr}
2798 str2float({expr}) Float convert String to Float 2797 str2float({expr}) Float convert String to Float
2799 str2list({expr} [, {utf8}]) List convert each character of {expr} to 2798 str2list({expr} [, {utf8}]) List convert each character of {expr} to
2800 ASCII/UTF8 value 2799 ASCII/UTF8 value
2801 str2nr({expr} [, {base} [, {quoted}]]) 2800 str2nr({expr} [, {base} [, {quoted}]])
2802 Number convert String to Number 2801 Number convert String to Number
2803 strchars({expr} [, {skipcc}]) Number character length of the String {expr}
2804 strcharpart({str}, {start} [, {len}]) 2802 strcharpart({str}, {start} [, {len}])
2805 String {len} characters of {str} at {start} 2803 String {len} characters of {str} at {start}
2804 strchars({expr} [, {skipcc}]) Number character length of the String {expr}
2806 strdisplaywidth({expr} [, {col}]) Number display length of the String {expr} 2805 strdisplaywidth({expr} [, {col}]) Number display length of the String {expr}
2807 strftime({format} [, {time}]) String format time with a specified format 2806 strftime({format} [, {time}]) String format time with a specified format
2808 strgetchar({str}, {index}) Number get char {index} from {str} 2807 strgetchar({str}, {index}) Number get char {index} from {str}
2809 stridx({haystack}, {needle} [, {start}]) 2808 stridx({haystack}, {needle} [, {start}])
2810 Number index of {needle} in {haystack} 2809 Number index of {needle} in {haystack}
2833 system({expr} [, {input}]) String output of shell command/filter {expr} 2832 system({expr} [, {input}]) String output of shell command/filter {expr}
2834 systemlist({expr} [, {input}]) List output of shell command/filter {expr} 2833 systemlist({expr} [, {input}]) List output of shell command/filter {expr}
2835 tabpagebuflist([{arg}]) List list of buffer numbers in tab page 2834 tabpagebuflist([{arg}]) List list of buffer numbers in tab page
2836 tabpagenr([{arg}]) Number number of current or last tab page 2835 tabpagenr([{arg}]) Number number of current or last tab page
2837 tabpagewinnr({tabarg} [, {arg}]) Number number of current window in tab page 2836 tabpagewinnr({tabarg} [, {arg}]) Number number of current window in tab page
2837 tagfiles() List tags files used
2838 taglist({expr} [, {filename}]) List list of tags matching {expr} 2838 taglist({expr} [, {filename}]) List list of tags matching {expr}
2839 tagfiles() List tags files used
2840 tan({expr}) Float tangent of {expr} 2839 tan({expr}) Float tangent of {expr}
2841 tanh({expr}) Float hyperbolic tangent of {expr} 2840 tanh({expr}) Float hyperbolic tangent of {expr}
2842 tempname() String name for a temporary file 2841 tempname() String name for a temporary file
2843 term_dumpdiff({filename}, {filename} [, {options}]) 2842 term_dumpdiff({filename}, {filename} [, {options}])
2844 Number display difference between two dumps 2843 Number display difference between two dumps
2858 term_gettitle({buf}) String get the title of a terminal 2857 term_gettitle({buf}) String get the title of a terminal
2859 term_gettty({buf}, [{input}]) String get the tty name of a terminal 2858 term_gettty({buf}, [{input}]) String get the tty name of a terminal
2860 term_list() List get the list of terminal buffers 2859 term_list() List get the list of terminal buffers
2861 term_scrape({buf}, {row}) List get row of a terminal screen 2860 term_scrape({buf}, {row}) List get row of a terminal screen
2862 term_sendkeys({buf}, {keys}) none send keystrokes to a terminal 2861 term_sendkeys({buf}, {keys}) none send keystrokes to a terminal
2863 term_setapi({buf}, {expr}) none set |terminal-api| function name prefix
2864 term_setansicolors({buf}, {colors}) 2862 term_setansicolors({buf}, {colors})
2865 none set ANSI palette in GUI color mode 2863 none set ANSI palette in GUI color mode
2864 term_setapi({buf}, {expr}) none set |terminal-api| function name prefix
2866 term_setkill({buf}, {how}) none set signal to stop job in terminal 2865 term_setkill({buf}, {how}) none set signal to stop job in terminal
2867 term_setrestore({buf}, {command}) none set command to restore terminal 2866 term_setrestore({buf}, {command}) none set command to restore terminal
2868 term_setsize({buf}, {rows}, {cols}) 2867 term_setsize({buf}, {rows}, {cols})
2869 none set the size of a terminal 2868 none set the size of a terminal
2870 term_start({cmd} [, {options}]) Number open a terminal window and run a job 2869 term_start({cmd} [, {options}]) Number open a terminal window and run a job
2883 test_null_function() Funcref null value for testing 2882 test_null_function() Funcref null value for testing
2884 test_null_job() Job null value for testing 2883 test_null_job() Job null value for testing
2885 test_null_list() List null value for testing 2884 test_null_list() List null value for testing
2886 test_null_partial() Funcref null value for testing 2885 test_null_partial() Funcref null value for testing
2887 test_null_string() String null value for testing 2886 test_null_string() String null value for testing
2888 test_unknown() any unknown value for testing
2889 test_void() any void value for testing
2890 test_option_not_set({name}) none reset flag indicating option was set 2887 test_option_not_set({name}) none reset flag indicating option was set
2891 test_override({expr}, {val}) none test with Vim internal overrides 2888 test_override({expr}, {val}) none test with Vim internal overrides
2892 test_refcount({expr}) Number get the reference count of {expr} 2889 test_refcount({expr}) Number get the reference count of {expr}
2893 test_scrollbar({which}, {value}, {dragging}) 2890 test_scrollbar({which}, {value}, {dragging})
2894 none scroll in the GUI for testing 2891 none scroll in the GUI for testing
2895 test_setmouse({row}, {col}) none set the mouse position for testing 2892 test_setmouse({row}, {col}) none set the mouse position for testing
2893 test_settime({expr}) none set current time for testing
2896 test_srand_seed([seed]) none set seed for testing srand() 2894 test_srand_seed([seed]) none set seed for testing srand()
2897 test_settime({expr}) none set current time for testing 2895 test_unknown() any unknown value for testing
2896 test_void() any void value for testing
2898 timer_info([{id}]) List information about timers 2897 timer_info([{id}]) List information about timers
2899 timer_pause({id}, {pause}) none pause or unpause a timer 2898 timer_pause({id}, {pause}) none pause or unpause a timer
2900 timer_start({time}, {callback} [, {options}]) 2899 timer_start({time}, {callback} [, {options}])
2901 Number create a timer 2900 Number create a timer
2902 timer_stop({timer}) none stop a timer 2901 timer_stop({timer}) none stop a timer
4395 will behave as if <Esc> is typed, to avoid getting 4394 will behave as if <Esc> is typed, to avoid getting
4396 stuck, waiting for a character to be typed before the 4395 stuck, waiting for a character to be typed before the
4397 script continues. 4396 script continues.
4398 Note that if you manage to call feedkeys() while 4397 Note that if you manage to call feedkeys() while
4399 executing commands, thus calling it recursively, then 4398 executing commands, thus calling it recursively, then
4400 all typehead will be consumed by the last call. 4399 all typeahead will be consumed by the last call.
4401 '!' When used with 'x' will not end Insert mode. Can be 4400 '!' When used with 'x' will not end Insert mode. Can be
4402 used in a test when a timer is set to exit Insert mode 4401 used in a test when a timer is set to exit Insert mode
4403 a little later. Useful for testing CursorHoldI. 4402 a little later. Useful for testing CursorHoldI.
4404 4403
4405 Return value is always 0. 4404 Return value is always 0.
4431 name {file} exists, and can be written. If {file} doesn't 4430 name {file} exists, and can be written. If {file} doesn't
4432 exist, or is not writable, the result is 0. If {file} is a 4431 exist, or is not writable, the result is 0. If {file} is a
4433 directory, and we can write to it, the result is 2. 4432 directory, and we can write to it, the result is 2.
4434 4433
4435 Can also be used as a |method|: > 4434 Can also be used as a |method|: >
4436 GetName()->filewriteable() 4435 GetName()->filewritable()
4437 4436
4438 4437
4439 filter({expr1}, {expr2}) *filter()* 4438 filter({expr1}, {expr2}) *filter()*
4440 {expr1} must be a |List| or a |Dictionary|. 4439 {expr1} must be a |List| or a |Dictionary|.
4441 For each item in {expr1} evaluate {expr2} and when the result 4440 For each item in {expr1} evaluate {expr2} and when the result
5432 5431
5433 If not over a window, e.g. when in the command line, then only 5432 If not over a window, e.g. when in the command line, then only
5434 "screenrow" and "screencol" are valid, the others are zero. 5433 "screenrow" and "screencol" are valid, the others are zero.
5435 5434
5436 When on the status line below a window or the vertical 5435 When on the status line below a window or the vertical
5437 separater right of a window, the "line" and "column" values 5436 separator right of a window, the "line" and "column" values
5438 are zero. 5437 are zero.
5439 5438
5440 When the position is after the text then "column" is the 5439 When the position is after the text then "column" is the
5441 length of the text in bytes. 5440 length of the text in bytes.
5442 5441
6948 nnoremap K somethingelse 6947 nnoremap K somethingelse
6949 ... 6948 ...
6950 call mapset('n', 0, save_map) 6949 call mapset('n', 0, save_map)
6951 < Note that if you are going to replace a map in several modes, 6950 < Note that if you are going to replace a map in several modes,
6952 e.g. with `:map!`, you need to save the mapping for all of 6951 e.g. with `:map!`, you need to save the mapping for all of
6953 them, since they can differe. 6952 them, since they can differ.
6954 6953
6955 6954
6956 match({expr}, {pat} [, {start} [, {count}]]) *match()* 6955 match({expr}, {pat} [, {start} [, {count}]]) *match()*
6957 When {expr} is a |List| then this returns the index of the 6956 When {expr} is a |List| then this returns the index of the
6958 first item where {pat} matches. Each item is used as a 6957 first item where {pat} matches. Each item is used as a
8545 {options} must be a Dictionary. It can contain: 8544 {options} must be a Dictionary. It can contain:
8546 key type meaning ~ 8545 key type meaning ~
8547 recompute |Boolean| if |TRUE|, recompute the count 8546 recompute |Boolean| if |TRUE|, recompute the count
8548 like |n| or |N| was executed. 8547 like |n| or |N| was executed.
8549 otherwise returns the last 8548 otherwise returns the last
8550 result by |n|, |N|, or this 8549 computed result (when |n| or
8551 function is returned. 8550 |N| was used when "S" is not
8551 in 'shortmess', or this
8552 function was called).
8552 (default: |TRUE|) 8553 (default: |TRUE|)
8553 pattern |String| recompute if this was given 8554 pattern |String| recompute if this was given
8554 and different with |@/|. 8555 and different with |@/|.
8555 this works as same as the 8556 this works as same as the
8556 below command is executed 8557 below command is executed