comparison runtime/doc/eval.txt @ 24911:fd37be6dc258

Update runtime files Commit: https://github.com/vim/vim/commit/2346a6378483c9871016f9fc821ec5cbea638f13 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 13 19:02:49 2021 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Sun, 13 Jun 2021 19:15:03 +0200
parents 3f9053c21765
children f4aa891a5ab8
comparison
equal deleted inserted replaced
24910:77de4ae3e013 24911:fd37be6dc258
1 *eval.txt* For Vim version 8.2. Last change: 2021 May 07 1 *eval.txt* For Vim version 8.2. Last change: 2021 Jun 07
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
2100 2100
2101 *v:numbermax* *numbermax-variable* 2101 *v:numbermax* *numbermax-variable*
2102 v:numbermax Maximum value of a number. 2102 v:numbermax Maximum value of a number.
2103 2103
2104 *v:numbermin* *numbermin-variable* 2104 *v:numbermin* *numbermin-variable*
2105 v:numbermin Minimum value of a number (negative) 2105 v:numbermin Minimum value of a number (negative).
2106 2106
2107 *v:numbersize* *numbersize-variable* 2107 *v:numbersize* *numbersize-variable*
2108 v:numbersize Number of bits in a Number. This is normally 64, but on some 2108 v:numbersize Number of bits in a Number. This is normally 64, but on some
2109 systems it may be 32. 2109 systems it may be 32.
2110 2110
2506 changenr() Number current change number 2506 changenr() Number current change number
2507 char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr} 2507 char2nr({expr} [, {utf8}]) Number ASCII/UTF8 value of first char in {expr}
2508 charclass({string}) Number character class of {string} 2508 charclass({string}) Number character class of {string}
2509 charcol({expr}) Number column number of cursor or mark 2509 charcol({expr}) Number column number of cursor or mark
2510 charidx({string}, {idx} [, {countcc}]) 2510 charidx({string}, {idx} [, {countcc}])
2511 Number char index of byte {idx} in {string} 2511 Number char index of byte {idx} in {string}
2512 chdir({dir}) String change current working directory 2512 chdir({dir}) String change current working directory
2513 cindent({lnum}) Number C indent for line {lnum} 2513 cindent({lnum}) Number C indent for line {lnum}
2514 clearmatches([{win}]) none clear all matches 2514 clearmatches([{win}]) none clear all matches
2515 col({expr}) Number column byte index of cursor or mark 2515 col({expr}) Number column byte index of cursor or mark
2516 complete({startcol}, {matches}) none set Insert mode completion 2516 complete({startcol}, {matches}) none set Insert mode completion
2527 cscope_connection([{num}, {dbpath} [, {prepend}]]) 2527 cscope_connection([{num}, {dbpath} [, {prepend}]])
2528 Number checks existence of cscope connection 2528 Number checks existence of cscope connection
2529 cursor({lnum}, {col} [, {off}]) 2529 cursor({lnum}, {col} [, {off}])
2530 Number move cursor to {lnum}, {col}, {off} 2530 Number move cursor to {lnum}, {col}, {off}
2531 cursor({list}) Number move cursor to position in {list} 2531 cursor({list}) Number move cursor to position in {list}
2532 debugbreak({pid}) Number interrupt process being debugged 2532 debugbreak({pid}) Number interrupt process being debugged
2533 deepcopy({expr} [, {noref}]) any make a full copy of {expr} 2533 deepcopy({expr} [, {noref}]) any make a full copy of {expr}
2534 delete({fname} [, {flags}]) Number delete the file or directory {fname} 2534 delete({fname} [, {flags}]) Number delete the file or directory {fname}
2535 deletebufline({expr}, {first} [, {last}]) 2535 deletebufline({expr}, {first} [, {last}])
2536 Number delete lines from buffer {expr} 2536 Number delete lines from buffer {expr}
2537 did_filetype() Number |TRUE| if FileType autocmd event used 2537 did_filetype() Number |TRUE| if FileType autocmd event used
4949 function. 4949 function.
4950 4950
4951 Can also be used as a |method|: > 4951 Can also be used as a |method|: >
4952 GetFuncname()->funcref([arg]) 4952 GetFuncname()->funcref([arg])
4953 < 4953 <
4954 *function()* *E700* *E922* *E923* 4954 *function()* *partial* *E700* *E922* *E923*
4955 function({name} [, {arglist}] [, {dict}]) 4955 function({name} [, {arglist}] [, {dict}])
4956 Return a |Funcref| variable that refers to function {name}. 4956 Return a |Funcref| variable that refers to function {name}.
4957 {name} can be the name of a user defined function or an 4957 {name} can be the name of a user defined function or an
4958 internal function. 4958 internal function.
4959 4959
5498 < Note that this only works within the window. See 5498 < Note that this only works within the window. See
5499 |winrestview()| for restoring more state. 5499 |winrestview()| for restoring more state.
5500 5500
5501 Can also be used as a |method|: > 5501 Can also be used as a |method|: >
5502 GetWinid()->getcurpos() 5502 GetWinid()->getcurpos()
5503 5503 <
5504 < *getcursorcharpos()* 5504 *getcursorcharpos()*
5505 getcursorcharpos([{winid}]) 5505 getcursorcharpos([{winid}])
5506 Same as |getcurpos()| but the column number in the returned 5506 Same as |getcurpos()| but the column number in the returned
5507 List is a character index instead of a byte index. 5507 List is a character index instead of a byte index.
5508 5508
5509 Example: 5509 Example:
5510 With the cursor on '보' in line 3 with text "여보세요": > 5510 With the cursor on '보' in line 3 with text "여보세요": >
5511 getcursorcharpos() returns [0, 3, 2, 0, 3] 5511 getcursorcharpos() returns [0, 3, 2, 0, 3]
5512 getcurpos() returns [0, 3, 4, 0, 3] 5512 getcurpos() returns [0, 3, 4, 0, 3]
5513 5513 <
5514 < Can also be used as a |method|: > 5514 Can also be used as a |method|: >
5515 GetWinid()->getcursorcharpos() 5515 GetWinid()->getcursorcharpos()
5516 5516
5517 < *getcwd()* 5517 < *getcwd()*
5518 getcwd([{winnr} [, {tabnr}]]) 5518 getcwd([{winnr} [, {tabnr}]])
5519 The result is a String, which is the name of the current 5519 The result is a String, which is the name of the current
5734 If the optional {expr} argument is specified, returns the 5734 If the optional {expr} argument is specified, returns the
5735 local marks defined in buffer {expr}. For the use of {expr}, 5735 local marks defined in buffer {expr}. For the use of {expr},
5736 see |bufname()|. 5736 see |bufname()|.
5737 5737
5738 Each item in the returned List is a |Dict| with the following: 5738 Each item in the returned List is a |Dict| with the following:
5739 name - name of the mark prefixed by "'" 5739 mark name of the mark prefixed by "'"
5740 pos - a |List| with the position of the mark: 5740 pos a |List| with the position of the mark:
5741 [bufnum, lnum, col, off] 5741 [bufnum, lnum, col, off]
5742 Refer to |getpos()| for more information. 5742 Refer to |getpos()| for more information.
5743 file - file name 5743 file file name
5744 5744
5745 Refer to |getpos()| for getting information about a specific 5745 Refer to |getpos()| for getting information about a specific
5746 mark. 5746 mark.
5747 5747
5748 Can also be used as a |method|: > 5748 Can also be used as a |method|: >
5820 Note that for '< and '> Visual mode matters: when it is "V" 5820 Note that for '< and '> Visual mode matters: when it is "V"
5821 (visual line mode) the column of '< is zero and the column of 5821 (visual line mode) the column of '< is zero and the column of
5822 '> is a large number. 5822 '> is a large number.
5823 The column number in the returned List is the byte position 5823 The column number in the returned List is the byte position
5824 within the line. To get the character position in the line, 5824 within the line. To get the character position in the line,
5825 use |getcharpos()| 5825 use |getcharpos()|.
5826 The column number can be very large, e.g. 2147483647, in which 5826 The column number can be very large, e.g. 2147483647, in which
5827 case it means "after the end of the line". 5827 case it means "after the end of the line".
5828 This can be used to save and restore the position of a mark: > 5828 This can be used to save and restore the position of a mark: >
5829 let save_a_mark = getpos("'a") 5829 let save_a_mark = getpos("'a")
5830 ... 5830 ...
7635 7635
7636 matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()* 7636 matchfuzzypos({list}, {str} [, {dict}]) *matchfuzzypos()*
7637 Same as |matchfuzzy()|, but returns the list of matched 7637 Same as |matchfuzzy()|, but returns the list of matched
7638 strings, the list of character positions where characters 7638 strings, the list of character positions where characters
7639 in {str} matches and a list of matching scores. You can 7639 in {str} matches and a list of matching scores. You can
7640 use |byteidx()|to convert a character position to a byte 7640 use |byteidx()| to convert a character position to a byte
7641 position. 7641 position.
7642 7642
7643 If {str} matches multiple times in a string, then only the 7643 If {str} matches multiple times in a string, then only the
7644 positions for the best match is returned. 7644 positions for the best match is returned.
7645 7645
9959 Compute()->sinh() 9959 Compute()->sinh()
9960 < 9960 <
9961 {only available when compiled with the |+float| feature} 9961 {only available when compiled with the |+float| feature}
9962 9962
9963 9963
9964 slice({expr}, {start} [, {end}]) *slice()* 9964 slice({expr}, {start} [, {end}]) *slice()*
9965 Similar to using a |slice| "expr[start : end]", but "end" is 9965 Similar to using a |slice| "expr[start : end]", but "end" is
9966 used exclusive. And for a string the indexes are used as 9966 used exclusive. And for a string the indexes are used as
9967 character indexes instead of byte indexes, like in 9967 character indexes instead of byte indexes, like in
9968 |vim9script|. Also, composing characters are not counted. 9968 |vim9script|. Also, composing characters are not counted.
9969 When {end} is omitted the slice continues to the last item. 9969 When {end} is omitted the slice continues to the last item.