comparison runtime/doc/eval.txt @ 18343:375a7ecdb351

Update runtime files. Commit: https://github.com/vim/vim/commit/2e693a88b24dc6b12883fad78ff2cb9cd4469c98 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Oct 16 22:35:02 2019 +0200 Update runtime files.
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Oct 2019 22:45:04 +0200
parents 03b854983b14
children 6d11fc4aa683
comparison
equal deleted inserted replaced
18342:fedab77fee7b 18343:375a7ecdb351
1 *eval.txt* For Vim version 8.1. Last change: 2019 Sep 27 1 *eval.txt* For Vim version 8.1. Last change: 2019 Oct 13
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
2878 win_gotoid({expr}) Number go to window with ID {expr} 2878 win_gotoid({expr}) Number go to window with ID {expr}
2879 win_id2tabwin({expr}) List get tab and window nr from window ID 2879 win_id2tabwin({expr}) List get tab and window nr from window ID
2880 win_id2win({expr}) Number get window nr from window ID 2880 win_id2win({expr}) Number get window nr from window ID
2881 win_screenpos({nr}) List get screen position of window {nr} 2881 win_screenpos({nr}) List get screen position of window {nr}
2882 win_splitmove({nr}, {target} [, {options}]) 2882 win_splitmove({nr}, {target} [, {options}])
2883 none move window {nr} to split of {target} 2883 Number move window {nr} to split of {target}
2884 winbufnr({nr}) Number buffer number of window {nr} 2884 winbufnr({nr}) Number buffer number of window {nr}
2885 wincol() Number window column of the cursor 2885 wincol() Number window column of the cursor
2886 winheight({nr}) Number height of window {nr} 2886 winheight({nr}) Number height of window {nr}
2887 winlayout([{tabnr}]) List layout of windows in tab {tabnr} 2887 winlayout([{tabnr}]) List layout of windows in tab {tabnr}
2888 winline() Number window line of the cursor 2888 winline() Number window line of the cursor
2971 mylist->append(lnum) 2971 mylist->append(lnum)
2972 2972
2973 2973
2974 appendbufline({expr}, {lnum}, {text}) *appendbufline()* 2974 appendbufline({expr}, {lnum}, {text}) *appendbufline()*
2975 Like |append()| but append the text in buffer {expr}. 2975 Like |append()| but append the text in buffer {expr}.
2976
2977 This function works only for loaded buffers. First call
2978 |bufload()| if needed.
2976 2979
2977 For the use of {expr}, see |bufname()|. 2980 For the use of {expr}, see |bufname()|.
2978 2981
2979 {lnum} is used like with |append()|. Note that using |line()| 2982 {lnum} is used like with |append()|. Note that using |line()|
2980 would use the current buffer, not the one appending to. 2983 would use the current buffer, not the one appending to.
3538 return '' 3541 return ''
3539 endfunc 3542 endfunc
3540 < This isn't very useful, but it shows how it works. Note that 3543 < This isn't very useful, but it shows how it works. Note that
3541 an empty string is returned to avoid a zero being inserted. 3544 an empty string is returned to avoid a zero being inserted.
3542 3545
3543 Can also be used as a |method|, the second argument is passed 3546 Can also be used as a |method|, the base is passed as the
3544 in: > 3547 second argument: >
3545 GetMatches()->complete(col('.')) 3548 GetMatches()->complete(col('.'))
3546 3549
3547 complete_add({expr}) *complete_add()* 3550 complete_add({expr}) *complete_add()*
3548 Add {expr} to the list of matches. Only to be used by the 3551 Add {expr} to the list of matches. Only to be used by the
3549 function specified with the 'completefunc' option. 3552 function specified with the 'completefunc' option.
3674 don't fit, a vertical layout is used anyway. For some systems 3677 don't fit, a vertical layout is used anyway. For some systems
3675 the horizontal layout is always used. 3678 the horizontal layout is always used.
3676 3679
3677 Can also be used as a |method|in: > 3680 Can also be used as a |method|in: >
3678 BuildMessage()->confirm("&Yes\n&No") 3681 BuildMessage()->confirm("&Yes\n&No")
3679 3682 <
3680 *copy()* 3683 *copy()*
3681 copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't 3684 copy({expr}) Make a copy of {expr}. For Numbers and Strings this isn't
3682 different from using {expr} directly. 3685 different from using {expr} directly.
3683 When {expr} is a |List| a shallow copy is created. This means 3686 When {expr} is a |List| a shallow copy is created. This means
3684 that the original |List| can be changed without changing the 3687 that the original |List| can be changed without changing the
3869 deletebufline({expr}, {first} [, {last}]) *deletebufline()* 3872 deletebufline({expr}, {first} [, {last}]) *deletebufline()*
3870 Delete lines {first} to {last} (inclusive) from buffer {expr}. 3873 Delete lines {first} to {last} (inclusive) from buffer {expr}.
3871 If {last} is omitted then delete line {first} only. 3874 If {last} is omitted then delete line {first} only.
3872 On success 0 is returned, on failure 1 is returned. 3875 On success 0 is returned, on failure 1 is returned.
3873 3876
3877 This function works only for loaded buffers. First call
3878 |bufload()| if needed.
3879
3874 For the use of {expr}, see |bufname()| above. 3880 For the use of {expr}, see |bufname()| above.
3875 3881
3876 {first} and {last} are used like with |getline()|. Note that 3882 {first} and {last} are used like with |getline()|. Note that
3877 when using |line()| this refers to the current buffer. Use "$" 3883 when using |line()| this refers to the current buffer. Use "$"
3878 to refer to the last line in buffer {expr}. 3884 to refer to the last line in buffer {expr}.
3879 3885
3880 Can also be used as a |method|: > 3886 Can also be used as a |method|: >
3881 GetBuffer()->deletebufline(1) 3887 GetBuffer()->deletebufline(1)
3882 3888 <
3883 *did_filetype()* 3889 *did_filetype()*
3884 did_filetype() Returns |TRUE| when autocommands are being executed and the 3890 did_filetype() Returns |TRUE| when autocommands are being executed and the
3885 FileType event has been triggered at least once. Can be used 3891 FileType event has been triggered at least once. Can be used
3886 to avoid triggering the FileType event again in the scripts 3892 to avoid triggering the FileType event again in the scripts
3887 that detect the file type. |FileType| 3893 that detect the file type. |FileType|
4038 < If {expr} cannot be found in $PATH or is not executable then 4044 < If {expr} cannot be found in $PATH or is not executable then
4039 an empty string is returned. 4045 an empty string is returned.
4040 4046
4041 Can also be used as a |method|: > 4047 Can also be used as a |method|: >
4042 GetCommand()->exepath() 4048 GetCommand()->exepath()
4043 4049 <
4044 *exists()* 4050 *exists()*
4045 exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined, 4051 exists({expr}) The result is a Number, which is |TRUE| if {expr} is defined,
4046 zero otherwise. 4052 zero otherwise.
4047 4053
4048 For checking for a supported feature use |has()|. 4054 For checking for a supported feature use |has()|.
4564 foldlevel is unknown. As a special case the level of the 4570 foldlevel is unknown. As a special case the level of the
4565 previous line is usually available. 4571 previous line is usually available.
4566 4572
4567 Can also be used as a |method|: > 4573 Can also be used as a |method|: >
4568 GetLnum()->foldlevel() 4574 GetLnum()->foldlevel()
4569 4575 <
4570 *foldtext()* 4576 *foldtext()*
4571 foldtext() Returns a String, to be displayed for a closed fold. This is 4577 foldtext() Returns a String, to be displayed for a closed fold. This is
4572 the default function used for the 'foldtext' option and should 4578 the default function used for the 'foldtext' option and should
4573 only be called from evaluating 'foldtext'. It uses the 4579 only be called from evaluating 'foldtext'. It uses the
4574 |v:foldstart|, |v:foldend| and |v:folddashes| variables. 4580 |v:foldstart|, |v:foldend| and |v:folddashes| variables.
5846 Example: > 5852 Example: >
5847 :call histadd("input", strftime("%Y %b %d")) 5853 :call histadd("input", strftime("%Y %b %d"))
5848 :let date=input("Enter date: ") 5854 :let date=input("Enter date: ")
5849 < This function is not available in the |sandbox|. 5855 < This function is not available in the |sandbox|.
5850 5856
5851 Can also be used as a |method|, the base is used for the 5857 Can also be used as a |method|, the base is passed as the
5852 second argument: > 5858 second argument: >
5853 GetHistory()->histadd('search') 5859 GetHistory()->histadd('search')
5854 5860
5855 histdel({history} [, {item}]) *histdel()* 5861 histdel({history} [, {item}]) *histdel()*
5856 Clear {history}, i.e. delete all its entries. See |hist-names| 5862 Clear {history}, i.e. delete all its entries. See |hist-names|
6374 {only in Win32 and some Unix versions, when the |+libcall| 6380 {only in Win32 and some Unix versions, when the |+libcall|
6375 feature is present} 6381 feature is present}
6376 Examples: > 6382 Examples: >
6377 :echo libcall("libc.so", "getenv", "HOME") 6383 :echo libcall("libc.so", "getenv", "HOME")
6378 6384
6379 < Can also be used as a |method|, where the base is passed as 6385 < Can also be used as a |method|, the base is passed as the
6380 the argument to the called function: > 6386 third argument: >
6381 GetValue()->libcall("libc.so", "getenv") 6387 GetValue()->libcall("libc.so", "getenv")
6382 < 6388 <
6383 *libcallnr()* 6389 *libcallnr()*
6384 libcallnr({libname}, {funcname}, {argument}) 6390 libcallnr({libname}, {funcname}, {argument})
6385 Just like |libcall()|, but used for a function that returns an 6391 Just like |libcall()|, but used for a function that returns an
6389 Examples: > 6395 Examples: >
6390 :echo libcallnr("/usr/lib/libc.so", "getpid", "") 6396 :echo libcallnr("/usr/lib/libc.so", "getpid", "")
6391 :call libcallnr("libc.so", "printf", "Hello World!\n") 6397 :call libcallnr("libc.so", "printf", "Hello World!\n")
6392 :call libcallnr("libc.so", "sleep", 10) 6398 :call libcallnr("libc.so", "sleep", 10)
6393 < 6399 <
6394 Can also be used as a |method|, where the base is passed as 6400 Can also be used as a |method|, the base is passed as the
6395 the argument to the called function: > 6401 third argument: >
6396 GetValue()->libcallnr("libc.so", "printf") 6402 GetValue()->libcallnr("libc.so", "printf")
6397 < 6403 <
6398 6404
6399 line({expr} [, {winid}]) *line()* 6405 line({expr} [, {winid}]) *line()*
6400 The result is a Number, which is the line number of the file 6406 The result is a Number, which is the line number of the file
6541 Use the |BufReadPost| autocmd event to handle the initial text 6547 Use the |BufReadPost| autocmd event to handle the initial text
6542 of a buffer. 6548 of a buffer.
6543 The {callback} is also not invoked when the buffer is 6549 The {callback} is also not invoked when the buffer is
6544 unloaded, use the |BufUnload| autocmd event for that. 6550 unloaded, use the |BufUnload| autocmd event for that.
6545 6551
6546 Can also be used as a |method|, where the base is passed as 6552 Can also be used as a |method|, the base is passed as the
6547 the second argument, the buffer: > 6553 second argument: >
6548 GetBuffer()->listener_add(callback) 6554 GetBuffer()->listener_add(callback)
6549 6555
6550 listener_flush([{buf}]) *listener_flush()* 6556 listener_flush([{buf}]) *listener_flush()*
6551 Invoke listener callbacks for buffer {buf}. If there are no 6557 Invoke listener callbacks for buffer {buf}. If there are no
6552 pending changes then no callbacks are invoked. 6558 pending changes then no callbacks are invoked.
7012 < result is ["x", 1, 2, 3]. 7018 < result is ["x", 1, 2, 3].
7013 The type isn't changed, it's not necessarily a String. 7019 The type isn't changed, it's not necessarily a String.
7014 7020
7015 Can also be used as a |method|: > 7021 Can also be used as a |method|: >
7016 GetText()->matchstrpos('word') 7022 GetText()->matchstrpos('word')
7023 <
7017 *max()* 7024 *max()*
7018 max({expr}) Return the maximum value of all items in {expr}. 7025 max({expr}) Return the maximum value of all items in {expr}.
7019 {expr} can be a list or a dictionary. For a dictionary, 7026 {expr} can be a list or a dictionary. For a dictionary,
7020 it returns the maximum of all values in the dictionary. 7027 it returns the maximum of all values in the dictionary.
7021 If {expr} is neither a list nor a dictionary, or one of the 7028 If {expr} is neither a list nor a dictionary, or one of the
8268 {only available when compiled with the |+clientserver| feature} 8275 {only available when compiled with the |+clientserver| feature}
8269 Example: > 8276 Example: >
8270 :echo serverlist() 8277 :echo serverlist()
8271 < 8278 <
8272 setbufline({expr}, {lnum}, {text}) *setbufline()* 8279 setbufline({expr}, {lnum}, {text}) *setbufline()*
8273 Set line {lnum} to {text} in buffer {expr}. To insert 8280 Set line {lnum} to {text} in buffer {expr}. This works like
8274 lines use |append()|. Any text properties in {lnum} are 8281 |setline()| for the specified buffer.
8275 cleared. 8282
8283 This function works only for loaded buffers. First call
8284 |bufload()| if needed.
8285
8286 To insert lines use |appendbufline()|.
8287 Any text properties in {lnum} are cleared.
8288
8289 {text} can be a string to set one line, or a list of strings
8290 to set multiple lines. If the list extends below the last
8291 line then those lines are added.
8276 8292
8277 For the use of {expr}, see |bufname()| above. 8293 For the use of {expr}, see |bufname()| above.
8278 8294
8279 {lnum} is used like with |setline()|. 8295 {lnum} is used like with |setline()|.
8280 This works like |setline()| for the specified buffer. 8296 When {lnum} is just below the last line the {text} will be
8297 added below the last line.
8281 8298
8282 When {expr} is not a valid buffer, the buffer is not loaded or 8299 When {expr} is not a valid buffer, the buffer is not loaded or
8283 {lnum} is not valid then 1 is returned. On success 0 is 8300 {lnum} is not valid then 1 is returned. On success 0 is
8284 returned. 8301 returned.
8285 8302
8286 Can also be used as a |method|: > 8303 Can also be used as a |method|, the base is passed as the
8304 third argument: >
8287 GetText()->setbufline(buf, lnum) 8305 GetText()->setbufline(buf, lnum)
8288 8306
8289 setbufvar({expr}, {varname}, {val}) *setbufvar()* 8307 setbufvar({expr}, {varname}, {val}) *setbufvar()*
8290 Set option or local variable {varname} in buffer {expr} to 8308 Set option or local variable {varname} in buffer {expr} to
8291 {val}. 8309 {val}.
8297 Examples: > 8315 Examples: >
8298 :call setbufvar(1, "&mod", 1) 8316 :call setbufvar(1, "&mod", 1)
8299 :call setbufvar("todo", "myvar", "foobar") 8317 :call setbufvar("todo", "myvar", "foobar")
8300 < This function is not available in the |sandbox|. 8318 < This function is not available in the |sandbox|.
8301 8319
8302 Can also be used as a |method|: > 8320 Can also be used as a |method|, the base is passed as the
8321 third argument: >
8303 GetValue()->setbufvar(buf, varname) 8322 GetValue()->setbufvar(buf, varname)
8304 8323
8305 setcharsearch({dict}) *setcharsearch()* 8324 setcharsearch({dict}) *setcharsearch()*
8306 Set the current character search information to {dict}, 8325 Set the current character search information to {dict},
8307 which contains one or more of the following entries: 8326 which contains one or more of the following entries:
8346 setenv({name}, {val}) *setenv()* 8365 setenv({name}, {val}) *setenv()*
8347 Set environment variable {name} to {val}. 8366 Set environment variable {name} to {val}.
8348 When {val} is |v:null| the environment variable is deleted. 8367 When {val} is |v:null| the environment variable is deleted.
8349 See also |expr-env|. 8368 See also |expr-env|.
8350 8369
8351 Can also be used as a |method|, passing the value as the base: > 8370 Can also be used as a |method|, the base is passed as the
8371 second argument: >
8352 GetPath()->setenv('PATH') 8372 GetPath()->setenv('PATH')
8353 8373
8354 setfperm({fname}, {mode}) *setfperm()* *chmod* 8374 setfperm({fname}, {mode}) *setfperm()* *chmod*
8355 Set the file permissions for {fname} to {mode}. 8375 Set the file permissions for {fname} to {mode}.
8356 {mode} must be a string with 9 characters. It is of the form 8376 {mode} must be a string with 9 characters. It is of the form
8377 lines use |append()|. To set lines in another buffer use 8397 lines use |append()|. To set lines in another buffer use
8378 |setbufline()|. Any text properties in {lnum} are cleared. 8398 |setbufline()|. Any text properties in {lnum} are cleared.
8379 8399
8380 {lnum} is used like with |getline()|. 8400 {lnum} is used like with |getline()|.
8381 When {lnum} is just below the last line the {text} will be 8401 When {lnum} is just below the last line the {text} will be
8382 added as a new line. 8402 added below the last line.
8383 8403
8384 If this succeeds, 0 is returned. If this fails (most likely 8404 If this succeeds, 0 is returned. If this fails (most likely
8385 because {lnum} is invalid) 1 is returned. 8405 because {lnum} is invalid) 1 is returned.
8386 8406
8387 Example: > 8407 Example: >
8395 : call setline(n, l) 8415 : call setline(n, l)
8396 :endfor 8416 :endfor
8397 8417
8398 < Note: The '[ and '] marks are not set. 8418 < Note: The '[ and '] marks are not set.
8399 8419
8400 Can also be used as a |method|, passing the text as the base: > 8420 Can also be used as a |method|, the base is passed as the
8421 second argument: >
8401 GetText()->setline(lnum) 8422 GetText()->setline(lnum)
8402 8423
8403 setloclist({nr}, {list} [, {action} [, {what}]]) *setloclist()* 8424 setloclist({nr}, {list} [, {action} [, {what}]]) *setloclist()*
8404 Create or replace or add to the location list for window {nr}. 8425 Create or replace or add to the location list for window {nr}.
8405 {nr} can be the window number or the |window-ID|. 8426 {nr} can be the window number or the |window-ID|.
8644 triggered, e.g. when setting 'filetype'. 8665 triggered, e.g. when setting 'filetype'.
8645 Note that the variable name without "t:" must be used. 8666 Note that the variable name without "t:" must be used.
8646 Tabs are numbered starting with one. 8667 Tabs are numbered starting with one.
8647 This function is not available in the |sandbox|. 8668 This function is not available in the |sandbox|.
8648 8669
8649 Can also be used as a |method|, the base is used as the value: > 8670 Can also be used as a |method|, the base is passed as the
8671 third argument: >
8650 GetValue()->settabvar(tab, name) 8672 GetValue()->settabvar(tab, name)
8651 8673
8652 settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()* 8674 settabwinvar({tabnr}, {winnr}, {varname}, {val}) *settabwinvar()*
8653 Set option or local variable {varname} in window {winnr} to 8675 Set option or local variable {varname} in window {winnr} to
8654 {val}. 8676 {val}.
8665 Examples: > 8687 Examples: >
8666 :call settabwinvar(1, 1, "&list", 0) 8688 :call settabwinvar(1, 1, "&list", 0)
8667 :call settabwinvar(3, 2, "myvar", "foobar") 8689 :call settabwinvar(3, 2, "myvar", "foobar")
8668 < This function is not available in the |sandbox|. 8690 < This function is not available in the |sandbox|.
8669 8691
8670 Can also be used as a |method|, the base is used as the value: > 8692 Can also be used as a |method|, the base is passed as the
8693 fourth argument: >
8671 GetValue()->settabvar(tab, winnr, name) 8694 GetValue()->settabvar(tab, winnr, name)
8672 8695
8673 settagstack({nr}, {dict} [, {action}]) *settagstack()* 8696 settagstack({nr}, {dict} [, {action}]) *settagstack()*
8674 Modify the tag stack of the window {nr} using {dict}. 8697 Modify the tag stack of the window {nr} using {dict}.
8675 {nr} can be the window number or the |window-ID|. 8698 {nr} can be the window number or the |window-ID|.
8699 let stack = gettagstack(1003) 8722 let stack = gettagstack(1003)
8700 " do something else 8723 " do something else
8701 call settagstack(1003, stack) 8724 call settagstack(1003, stack)
8702 unlet stack 8725 unlet stack
8703 < 8726 <
8704 Can also be used as a |method|, the base is used as the Dict: > 8727 Can also be used as a |method|, the base is passed as the
8728 second argument: >
8705 GetStack()->settagstack(winnr) 8729 GetStack()->settagstack(winnr)
8706 8730
8707 setwinvar({winnr}, {varname}, {val}) *setwinvar()* 8731 setwinvar({winnr}, {varname}, {val}) *setwinvar()*
8708 Like |settabwinvar()| for the current tab page. 8732 Like |settabwinvar()| for the current tab page.
8709 Examples: > 8733 Examples: >
8710 :call setwinvar(1, "&list", 0) 8734 :call setwinvar(1, "&list", 0)
8711 :call setwinvar(2, "myvar", "foobar") 8735 :call setwinvar(2, "myvar", "foobar")
8712 8736
8713 < Can also be used as a |method|, the base is used as the value: > 8737 < Can also be used as a |method|, the base is passed as the
8738 third argument: >
8714 GetValue()->setwinvar(winnr, name) 8739 GetValue()->setwinvar(winnr, name)
8715 8740
8716 sha256({string}) *sha256()* 8741 sha256({string}) *sha256()*
8717 Returns a String with 64 hex characters, which is the SHA256 8742 Returns a String with 64 hex characters, which is the SHA256
8718 checksum of {string}. 8743 checksum of {string}.
9076 stuffed command 9101 stuffed command
9077 o operator pending or waiting for a command argument, 9102 o operator pending or waiting for a command argument,
9078 e.g. after |f| 9103 e.g. after |f|
9079 a Insert mode autocomplete active 9104 a Insert mode autocomplete active
9080 x executing an autocommand 9105 x executing an autocommand
9081 w blocked on waiting, e.g. ch_evalexpr() and 9106 w blocked on waiting, e.g. ch_evalexpr(), ch_read() and
9082 ch_read(), ch_readraw() when reading json. 9107 ch_readraw() when reading json.
9083 S not triggering SafeState or SafeStateAgain 9108 S not triggering SafeState or SafeStateAgain
9084 c callback invoked, including timer (repeats for 9109 c callback invoked, including timer (repeats for
9085 recursiveness up to "ccc") 9110 recursiveness up to "ccc")
9086 s screen has scrolled for messages 9111 s screen has scrolled for messages
9087 9112
9128 quotes are ignored, thus "1'000'000" is a million. 9153 quotes are ignored, thus "1'000'000" is a million.
9129 9154
9130 When {base} is omitted base 10 is used. This also means that 9155 When {base} is omitted base 10 is used. This also means that
9131 a leading zero doesn't cause octal conversion to be used, as 9156 a leading zero doesn't cause octal conversion to be used, as
9132 with the default String to Number conversion. Example: > 9157 with the default String to Number conversion. Example: >
9133 let nr = str2nr('123') 9158 let nr = str2nr('0123')
9134 < 9159 <
9135 When {base} is 16 a leading "0x" or "0X" is ignored. With a 9160 When {base} is 16 a leading "0x" or "0X" is ignored. With a
9136 different base the result will be zero. Similarly, when 9161 different base the result will be zero. Similarly, when
9137 {base} is 8 a leading "0" is ignored, and when {base} is 2 a 9162 {base} is 8 a leading "0" is ignored, and when {base} is 2 a
9138 leading "0b" or "0B" is ignored. 9163 leading "0b" or "0B" is ignored.
9245 stridx() works similar to the C function strstr(). When used 9270 stridx() works similar to the C function strstr(). When used
9246 with a single character it works similar to strchr(). 9271 with a single character it works similar to strchr().
9247 9272
9248 Can also be used as a |method|: > 9273 Can also be used as a |method|: >
9249 GetHaystack()->stridx(needle) 9274 GetHaystack()->stridx(needle)
9275 <
9250 *string()* 9276 *string()*
9251 string({expr}) Return {expr} converted to a String. If {expr} is a Number, 9277 string({expr}) Return {expr} converted to a String. If {expr} is a Number,
9252 Float, String, Blob or a composition of them, then the result 9278 Float, String, Blob or a composition of them, then the result
9253 can be parsed back with |eval()|. 9279 can be parsed back with |eval()|.
9254 {expr} type result ~ 9280 {expr} type result ~
10140 autocommands and not actually show syntax highlighting. 10166 autocommands and not actually show syntax highlighting.
10141 *E994* 10167 *E994*
10142 Not all commands are allowed in popup windows. 10168 Not all commands are allowed in popup windows.
10143 When window {id} does not exist then no error is given. 10169 When window {id} does not exist then no error is given.
10144 10170
10145 Can also be used as a |method|, the base is used for the 10171 Can also be used as a |method|, the base is passed as the
10146 command: > 10172 second argument: >
10147 GetCommand()->win_execute(winid) 10173 GetCommand()->win_execute(winid)
10148 10174
10149 win_findbuf({bufnr}) *win_findbuf()* 10175 win_findbuf({bufnr}) *win_findbuf()*
10150 Returns a list with |window-ID|s for windows that contain 10176 Returns a list with |window-ID|s for windows that contain
10151 buffer {bufnr}. When there is none the list is empty. 10177 buffer {bufnr}. When there is none the list is empty.
10459 xor({expr}, {expr}) *xor()* 10485 xor({expr}, {expr}) *xor()*
10460 Bitwise XOR on the two arguments. The arguments are converted 10486 Bitwise XOR on the two arguments. The arguments are converted
10461 to a number. A List, Dict or Float argument causes an error. 10487 to a number. A List, Dict or Float argument causes an error.
10462 Example: > 10488 Example: >
10463 :let bits = xor(bits, 0x80) 10489 :let bits = xor(bits, 0x80)
10464 < Can also be used as a |method|: > 10490 <
10491 Can also be used as a |method|: >
10465 :let bits = bits->xor(0x80) 10492 :let bits = bits->xor(0x80)
10466 < 10493 <
10467
10468 10494
10469 *feature-list* 10495 *feature-list*
10470 There are four types of features: 10496 There are four types of features:
10471 1. Features that are only supported when they have been enabled when Vim 10497 1. Features that are only supported when they have been enabled when Vim
10472 was compiled |+feature-list|. Example: > 10498 was compiled |+feature-list|. Example: >
11336 Like above, but append/add/subtract the value for each 11362 Like above, but append/add/subtract the value for each
11337 |List| item. 11363 |List| item.
11338 11364
11339 *:let=<<* *:let-heredoc* 11365 *:let=<<* *:let-heredoc*
11340 *E990* *E991* *E172* *E221* 11366 *E990* *E991* *E172* *E221*
11341 :let {var-name} =<< [trim] {marker} 11367 :let {var-name} =<< [trim] {endmarker}
11342 text... 11368 text...
11343 text... 11369 text...
11344 {marker} 11370 {endmarker}
11345 Set internal variable {var-name} to a List containing 11371 Set internal variable {var-name} to a List containing
11346 the lines of text bounded by the string {marker}. 11372 the lines of text bounded by the string {endmarker}.
11347 {marker} must not contain white space. 11373 {endmarker} must not contain white space.
11348 {marker} cannot start with a lower case character. 11374 {endmarker} cannot start with a lower case character.
11349 The last line should end only with the {marker} string 11375 The last line should end only with the {endmarker}
11350 without any other character. Watch out for white 11376 string without any other character. Watch out for
11351 space after {marker}! 11377 white space after {endmarker}!
11352 11378
11353 Without "trim" any white space characters in the lines 11379 Without "trim" any white space characters in the lines
11354 of text are preserved. If "trim" is specified before 11380 of text are preserved. If "trim" is specified before
11355 {marker}, then indentation is stripped so you can do: > 11381 {endmarker}, then indentation is stripped so you can
11382 do: >
11356 let text =<< trim END 11383 let text =<< trim END
11357 if ok 11384 if ok
11358 echo 'done' 11385 echo 'done'
11359 endif 11386 endif
11360 END 11387 END
11364 Specifically: all the leading indentation exactly 11391 Specifically: all the leading indentation exactly
11365 matching the leading indentation of the first 11392 matching the leading indentation of the first
11366 non-empty text line is stripped from the input lines. 11393 non-empty text line is stripped from the input lines.
11367 All leading indentation exactly matching the leading 11394 All leading indentation exactly matching the leading
11368 indentation before `let` is stripped from the line 11395 indentation before `let` is stripped from the line
11369 containing {marker}. Note that the difference between 11396 containing {endmarker}. Note that the difference
11370 space and tab matters here. 11397 between space and tab matters here.
11371 11398
11372 If {var-name} didn't exist yet, it is created. 11399 If {var-name} didn't exist yet, it is created.
11373 Cannot be followed by another command, but can be 11400 Cannot be followed by another command, but can be
11374 followed by a comment. 11401 followed by a comment.
11375 11402
11403 To avoid line continuation to be applied, consider
11404 adding 'C' to 'cpoptions': >
11405 set cpo+=C
11406 let var =<< END
11407 \ leading backslash
11408 END
11409 set cpo-=C
11410 <
11376 Examples: > 11411 Examples: >
11377 let var1 =<< END 11412 let var1 =<< END
11378 Sample text 1 11413 Sample text 1
11379 Sample text 2 11414 Sample text 2
11380 Sample text 3 11415 Sample text 3
11381 END 11416 END
11382 11417
11383 let data =<< trim DATA 11418 let data =<< trim DATA
11384 1 2 3 4 11419 1 2 3 4
11385 5 6 7 8 11420 5 6 7 8
11386 DATA 11421 DATA
11387 < 11422 <
11388 *E121* 11423 *E121*
11389 :let {var-name} .. List the value of variable {var-name}. Multiple 11424 :let {var-name} .. List the value of variable {var-name}. Multiple
11390 variable names may be given. Special names recognized 11425 variable names may be given. Special names recognized