diff options
35 files changed, 1650 insertions, 284 deletions
diff --git a/runtime/compiler/scdoc.vim b/runtime/compiler/scdoc.vim new file mode 100644 index 0000000000..2f6edc6322 --- /dev/null +++ b/runtime/compiler/scdoc.vim @@ -0,0 +1,16 @@ +" scdoc compiler for Vim +" Compiler: scdoc +" Maintainer: Greg Anders <greg@gpanders.com> +" Last Updated: 2019-10-24 + +if exists('current_compiler') + finish +endif +let current_compiler = 'scdoc' + +if exists(':CompilerSet') != 2 + command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet makeprg=scdoc\ <\ %\ 2>&1 +CompilerSet errorformat=Error\ at\ %l:%c:\ %m,%-G%.%# diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index d3ebc11fed..63d166dcf9 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 8.2. Last change: 2021 Jul 27 +*autocmd.txt* For Vim version 8.2. Last change: 2021 Aug 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -76,7 +76,7 @@ and in a `:def` function) then {cmd} will be executed as in Vim9 script. Thus this depends on where the autocmd is defined, not where it is triggered. -{cmd} can use a block, like with `:command`, see |:command-repl|. Example: > +{cmd} can be a block, like with `:command`, see |:command-repl|. Example: > au BufReadPost *.xml { setlocal matchpairs+=<:> /<start diff --git a/runtime/doc/channel.txt b/runtime/doc/channel.txt index 4049f22b44..39cb43c004 100644 --- a/runtime/doc/channel.txt +++ b/runtime/doc/channel.txt @@ -536,7 +536,7 @@ ch_evalraw({handle}, {string} [, {options}]) *ch_evalraw()* GetChannel()->ch_evalraw(rawstring) ch_getbufnr({handle}, {what}) *ch_getbufnr()* - Get the buffer number that {handle} is using for {what}. + Get the buffer number that {handle} is using for String {what}. {handle} can be a Channel or a Job that has a Channel. {what} can be "err" for stderr, "out" for stdout or empty for socket output. @@ -586,8 +586,8 @@ ch_info({handle}) *ch_info()* ch_log({msg} [, {handle}]) *ch_log()* - Write {msg} in the channel log file, if it was opened with - |ch_logfile()|. + Write String {msg} in the channel log file, if it was opened + with |ch_logfile()|. When {handle} is passed the channel number is used for the message. {handle} can be a Channel or a Job that has a Channel. The @@ -625,7 +625,7 @@ ch_open({address} [, {options}]) *ch_open()* Open a channel to {address}. See |channel|. Returns a Channel. Use |ch_status()| to check for failure. - {address} has the form "hostname:port", e.g., + {address} is a String and has the form "hostname:port", e.g., "localhost:8765". When using an IPv6 address, enclose it within square brackets. diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 5564f5d37d..0c472bb61a 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -1,4 +1,4 @@ -*cmdline.txt* For Vim version 8.2. Last change: 2021 May 30 +*cmdline.txt* For Vim version 8.2. Last change: 2021 Aug 06 VIM REFERENCE MANUAL by Bram Moolenaar @@ -170,7 +170,12 @@ CTRL-R {register} *c_CTRL-R* *c_<C-R>* too. When the result is a Float it's automatically converted to a String. - See |registers| about registers. + Note that when you only want to move the + cursor and not insert anything, you must make + sure the expression evaluates to an empty + string. E.g.: > + <C-R><C-R>=setcmdpos(2)[-1]<CR> +< See |registers| about registers. Implementation detail: When using the |expression| register and invoking setcmdpos(), this sets the position before inserting the resulting string. Use CTRL-R CTRL-R to set the diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 05c06ec7f9..31e901a54d 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.2. Last change: 2021 Jul 28 +*eval.txt* For Vim version 8.2. Last change: 2021 Aug 13 VIM REFERENCE MANUAL by Bram Moolenaar @@ -55,7 +55,6 @@ Float A floating point number. |floating-point-format| *Float* {only when compiled with the |+float| feature} Examples: 123.456 1.15e-6 -1.1e3 - *E928* String A NUL terminated string of 8-bit unsigned characters (bytes). |expr-string| Examples: "ab\txx\"--" 'x-z''a,c' @@ -121,7 +120,7 @@ base, use |str2nr()|. *TRUE* *FALSE* *Boolean* For boolean operators Numbers are used. Zero is FALSE, non-zero is TRUE. -You can also use |v:false| and |v:true|. In Vim9 script |false| and |true|. +You can also use |v:false| and |v:true|, in Vim9 script |false| and |true|. When TRUE is returned from a function it is the Number one, FALSE is the number zero. @@ -1348,7 +1347,8 @@ Floating point numbers can be written in two forms: [-+]{N}.{M}[eE][-+]{exp} {N} and {M} are numbers. Both {N} and {M} must be present and can only -contain digits. +contain digits, except that in |Vim9| script in {N} single quotes between +digits are ignored. [-+] means there is an optional plus or minus sign. {exp} is the exponent, power of 10. Only a decimal point is accepted, not a comma. No matter what the current @@ -2543,8 +2543,8 @@ cursor({list}) Number move cursor to position in {list} debugbreak({pid}) Number interrupt process being debugged deepcopy({expr} [, {noref}]) any make a full copy of {expr} delete({fname} [, {flags}]) Number delete the file or directory {fname} -deletebufline({expr}, {first} [, {last}]) - Number delete lines from buffer {expr} +deletebufline({buf}, {first} [, {last}]) + Number delete lines from buffer {buf} did_filetype() Number |TRUE| if FileType autocmd event used diff_filler({lnum}) Number diff filler lines about {lnum} diff_hlID({lnum}, {col}) Number diff highlighting at {lnum}/{col} @@ -2604,12 +2604,12 @@ garbagecollect([{atexit}]) none free memory, breaking cyclic references get({list}, {idx} [, {def}]) any get item {idx} from {list} or {def} get({dict}, {key} [, {def}]) any get item {key} from {dict} or {def} get({func}, {what}) any get property of funcref/partial {func} -getbufinfo([{expr}]) List information about buffers -getbufline({expr}, {lnum} [, {end}]) - List lines {lnum} to {end} of buffer {expr} -getbufvar({expr}, {varname} [, {def}]) - any variable {varname} in buffer {expr} -getchangelist([{expr}]) List list of change list items +getbufinfo([{buf}]) List information about buffers +getbufline({buf}, {lnum} [, {end}]) + List lines {lnum} to {end} of buffer {buf} +getbufvar({buf}, {varname} [, {def}]) + any variable {varname} in buffer {buf} +getchangelist([{buf}]) List list of change list items getchar([expr]) Number or String get one character from the user getcharmod() Number modifiers for the last typed character @@ -2638,7 +2638,7 @@ getline({lnum}) String line {lnum} of current buffer getline({lnum}, {end}) List lines {lnum} to {end} of current buffer getloclist({nr}) List list of location list items getloclist({nr}, {what}) Dict get specific location list properties -getmarklist([{expr}]) List list of global/local marks +getmarklist([{buf}]) List list of global/local marks getmatches([{win}]) List list of current matches getmousepos() Dict last known mouse position getpid() Number process ID of Vim @@ -2884,8 +2884,8 @@ serverlist() String get a list of available servers setbufline({expr}, {lnum}, {text}) Number set line {lnum} to {text} in buffer {expr} -setbufvar({expr}, {varname}, {val}) - none set {varname} in buffer {expr} to {val} +setbufvar({buf}, {varname}, {val}) + none set {varname} in buffer {buf} to {val} setcellwidths({list}) none set character cell width overrides setcharpos({expr}, {list}) Number set the {expr} position to {list} setcharsearch({dict}) Dict set character search from {dict} @@ -2919,11 +2919,11 @@ shiftwidth([{col}]) Number effective value of 'shiftwidth' sign_define({name} [, {dict}]) Number define or update a sign sign_define({list}) List define or update a list of signs sign_getdefined([{name}]) List get a list of defined signs -sign_getplaced([{expr} [, {dict}]]) +sign_getplaced([{buf} [, {dict}]]) List get a list of placed signs -sign_jump({id}, {group}, {expr}) +sign_jump({id}, {group}, {buf}) Number jump to a sign -sign_place({id}, {group}, {name}, {expr} [, {dict}]) +sign_place({id}, {group}, {name}, {buf} [, {dict}]) Number place a sign sign_placelist({list}) List place a list of signs sign_undefine([{name}]) Number undefine a sign @@ -2953,7 +2953,7 @@ split({expr} [, {pat} [, {keepempty}]]) sqrt({expr}) Float square root of {expr} srand([{expr}]) List get seed for |rand()| state([{what}]) String current state of Vim -str2float({expr}) Float convert String to Float +str2float({expr} [, {quoted}]) Float convert String to Float str2list({expr} [, {utf8}]) List convert each character of {expr} to ASCII/UTF8 value str2nr({expr} [, {base} [, {quoted}]]) @@ -2984,7 +2984,7 @@ submatch({nr} [, {list}]) String or List substitute({expr}, {pat}, {sub}, {flags}) String all {pat} in {expr} replaced with {sub} swapinfo({fname}) Dict information about swap file {fname} -swapname({expr}) String swap file of buffer {expr} +swapname({buf}) String swap file of buffer {buf} synID({lnum}, {col}, {trans}) Number syntax ID at {lnum} and {col} synIDattr({synID}, {what} [, {mode}]) String attribute {what} of syntax ID {synID} @@ -3189,13 +3189,13 @@ append({lnum}, {text}) *append()* mylist->append(lnum) -appendbufline({expr}, {lnum}, {text}) *appendbufline()* - Like |append()| but append the text in buffer {expr}. +appendbufline({buf}, {lnum}, {text}) *appendbufline()* + Like |append()| but append the text in buffer {buf}. This function works only for loaded buffers. First call |bufload()| if needed. - For the use of {expr}, see |bufname()|. + For the use of {buf}, see |bufname()|. {lnum} is used like with |append()|. Note that using |line()| would use the current buffer, not the one appending to. @@ -3203,7 +3203,7 @@ appendbufline({expr}, {lnum}, {text}) *appendbufline()* On success 0 is returned, on failure 1 is returned. - If {expr} is not a valid buffer or {lnum} is not valid, an + If {buf} is not a valid buffer or {lnum} is not valid, an error message is given. Example: > :let failed = appendbufline(13, 0, "# THE START") < @@ -3303,7 +3303,7 @@ atan2({expr1}, {expr2}) *atan2()* < 2.356194 Can also be used as a |method|: > - Compute()->atan(1) + Compute()->atan2(1) < {only available when compiled with the |+float| feature} @@ -3343,9 +3343,9 @@ balloon_show({expr}) *balloon_show()* |+balloon_eval_term| feature} balloon_split({msg}) *balloon_split()* - Split {msg} into lines to be displayed in a balloon. The - splits are made for the current window size and optimize to - show debugger output. + Split String {msg} into lines to be displayed in a balloon. + The splits are made for the current window size and optimize + to show debugger output. Returns a |List| with the split lines. Can also be used as a |method|: > GetText()->balloon_split()->balloon_show() @@ -3379,7 +3379,7 @@ browsedir({title}, {initdir}) browsing is not possible, an empty string is returned. bufadd({name}) *bufadd()* - Add a buffer to the buffer list with {name}. + Add a buffer to the buffer list with String {name}. If a buffer for file {name} already exists, return that buffer number. Otherwise return the buffer number of the newly created buffer. When {name} is an empty string then a new @@ -3392,13 +3392,13 @@ bufadd({name}) *bufadd()* < Can also be used as a |method|: > let bufnr = 'somename'->bufadd() -bufexists({expr}) *bufexists()* +bufexists({buf}) *bufexists()* The result is a Number, which is |TRUE| if a buffer called - {expr} exists. - If the {expr} argument is a number, buffer numbers are used. + {buf} exists. + If the {buf} argument is a number, buffer numbers are used. Number zero is the alternate buffer for the current window. - If the {expr} argument is a string it must match a buffer name + If the {buf} argument is a string it must match a buffer name exactly. The name can be: - Relative to the current directory. - A full path. @@ -3419,42 +3419,42 @@ bufexists({expr}) *bufexists()* < Obsolete name: buffer_exists(). *buffer_exists()* -buflisted({expr}) *buflisted()* +buflisted({buf}) *buflisted()* The result is a Number, which is |TRUE| if a buffer called - {expr} exists and is listed (has the 'buflisted' option set). - The {expr} argument is used like with |bufexists()|. + {buf} exists and is listed (has the 'buflisted' option set). + The {buf} argument is used like with |bufexists()|. Can also be used as a |method|: > let listed = 'somename'->buflisted() -bufload({expr}) *bufload()* - Ensure the buffer {expr} is loaded. When the buffer name +bufload({buf}) *bufload()* + Ensure the buffer {buf} is loaded. When the buffer name refers to an existing file then the file is read. Otherwise the buffer will be empty. If the buffer was already loaded then there is no change. If there is an existing swap file for the file of the buffer, there will be no dialog, the buffer will be loaded anyway. - The {expr} argument is used like with |bufexists()|. + The {buf} argument is used like with |bufexists()|. Can also be used as a |method|: > eval 'somename'->bufload() -bufloaded({expr}) *bufloaded()* +bufloaded({buf}) *bufloaded()* The result is a Number, which is |TRUE| if a buffer called - {expr} exists and is loaded (shown in a window or hidden). - The {expr} argument is used like with |bufexists()|. + {buf} exists and is loaded (shown in a window or hidden). + The {buf} argument is used like with |bufexists()|. Can also be used as a |method|: > let loaded = 'somename'->bufloaded() -bufname([{expr}]) *bufname()* +bufname([{buf}]) *bufname()* The result is the name of a buffer. Mostly as it is displayed by the `:ls` command, but not using special names such as "[No Name]". - If {expr} is omitted the current buffer is used. - If {expr} is a Number, that buffer number's name is given. + If {buf} is omitted the current buffer is used. + If {buf} is a Number, that buffer number's name is given. Number zero is the alternate buffer for the current window. - If {expr} is a String, it is used as a |file-pattern| to match + If {buf} is a String, it is used as a |file-pattern| to match with the buffer names. This is always done like 'magic' is set and 'cpoptions' is empty. When there is more than one match an empty string is returned. @@ -3467,7 +3467,7 @@ bufname([{expr}]) *bufname()* Listed buffers are found first. If there is a single match with a listed buffer, that one is returned. Next unlisted buffers are searched for. - If the {expr} is a String, but you want to use it as a buffer + If the {buf} is a String, but you want to use it as a buffer number, force it to be a Number by adding zero to it: > :echo bufname("3" + 0) < Can also be used as a |method|: > @@ -3483,9 +3483,9 @@ bufname([{expr}]) *bufname()* Obsolete name: buffer_name(). *bufnr()* -bufnr([{expr} [, {create}]]) +bufnr([{buf} [, {create}]]) The result is the number of a buffer, as it is displayed by - the `:ls` command. For the use of {expr}, see |bufname()| + the `:ls` command. For the use of {buf}, see |bufname()| above. If the buffer doesn't exist, -1 is returned. Or, if the @@ -3509,10 +3509,10 @@ bufnr([{expr} [, {create}]]) *last_buffer_nr()* Obsolete name for bufnr("$"): last_buffer_nr(). -bufwinid({expr}) *bufwinid()* +bufwinid({buf}) *bufwinid()* The result is a Number, which is the |window-ID| of the first - window associated with buffer {expr}. For the use of {expr}, - see |bufname()| above. If buffer {expr} doesn't exist or + window associated with buffer {buf}. For the use of {buf}, + see |bufname()| above. If buffer {buf} doesn't exist or there is no such window, -1 is returned. Example: > echo "A window containing buffer 1 is " . (bufwinid(1)) @@ -3522,10 +3522,10 @@ bufwinid({expr}) *bufwinid()* Can also be used as a |method|: > FindBuffer()->bufwinid() -bufwinnr({expr}) *bufwinnr()* +bufwinnr({buf}) *bufwinnr()* Like |bufwinid()| but return the window number instead of the |window-ID|. - If buffer {expr} doesn't exist or there is no such window, -1 + If buffer {buf} doesn't exist or there is no such window, -1 is returned. Example: > echo "A window containing buffer 1 is " . (bufwinnr(1)) @@ -3551,7 +3551,7 @@ byte2line({byte}) *byte2line()* feature} byteidx({expr}, {nr}) *byteidx()* - Return byte index of the {nr}'th character in the string + Return byte index of the {nr}'th character in the String {expr}. Use zero for the first character, it then returns zero. If there are no multibyte characters the returned value is @@ -3632,8 +3632,9 @@ changenr() *changenr()* redo it is the number of the redone change. After undo it is one less than the number of the undone change. -char2nr({expr} [, {utf8}]) *char2nr()* - Return number value of the first char in {expr}. Examples: > +char2nr({string} [, {utf8}]) *char2nr()* + Return number value of the first char in {string}. + Examples: > char2nr(" ") returns 32 char2nr("ABC") returns 65 < When {utf8} is omitted or zero, the current 'encoding' is used. @@ -3662,8 +3663,9 @@ charclass({string}) *charclass()* other specific Unicode class The class is used in patterns and word motions. - *charcol()* -charcol({expr}) Same as |col()| but returns the character index of the column + +charcol({expr}) *charcol()* + Same as |col()| but returns the character index of the column position given with {expr} instead of the byte position. Example: @@ -3799,6 +3801,7 @@ complete({startcol}, {matches}) *complete()* *E785* match. {matches} must be a |List|. Each |List| item is one match. See |complete-items| for the kind of items that are possible. + "longest" in 'completeopt' is ignored. Note that the after calling this function you need to avoid inserting anything that would cause completion to stop. The match can be selected with CTRL-N and CTRL-P as usual with @@ -3840,8 +3843,8 @@ complete_check() *complete_check()* Only to be used by the function specified with the 'completefunc' option. - *complete_info()* -complete_info([{what}]) + +complete_info([{what}]) *complete_info()* Returns a |Dictionary| with information about Insert mode completion. See |ins-completion|. The items are: @@ -3927,11 +3930,12 @@ confirm({msg} [, {choices} [, {default} [, {type}]]]) choice the default one. Use 0 to not set a default. If {default} is omitted, 1 is used. - The optional {type} argument gives the type of dialog. This - is only used for the icon of the GTK, Mac, Motif and Win32 - GUI. It can be one of these values: "Error", "Question", - "Info", "Warning" or "Generic". Only the first character is - relevant. When {type} is omitted, "Generic" is used. + The optional {type} String argument gives the type of dialog. + This is only used for the icon of the GTK, Mac, Motif and + Win32 GUI. It can be one of these values: "Error", + "Question", "Info", "Warning" or "Generic". Only the first + character is relevant. When {type} is omitted, "Generic" is + used. If the user aborts the dialog by pressing <Esc>, CTRL-C, or another valid interrupt key, confirm() returns 0. @@ -4125,7 +4129,7 @@ deepcopy({expr} [, {noref}]) *deepcopy()* *E698* Can also be used as a |method|: > GetObject()->deepcopy() -delete({fname} [, {flags}]) *delete()* +delete({fname} [, {flags}]) *delete()* Without {flags} or with {flags} empty: Deletes the file by the name {fname}. This also works when {fname} is a symbolic link. @@ -4150,19 +4154,19 @@ delete({fname} [, {flags}]) *delete()* Can also be used as a |method|: > GetName()->delete() -deletebufline({expr}, {first} [, {last}]) *deletebufline()* - Delete lines {first} to {last} (inclusive) from buffer {expr}. +deletebufline({buf}, {first} [, {last}]) *deletebufline()* + Delete lines {first} to {last} (inclusive) from buffer {buf}. If {last} is omitted then delete line {first} only. On success 0 is returned, on failure 1 is returned. This function works only for loaded buffers. First call |bufload()| if needed. - For the use of {expr}, see |bufname()| above. + For the use of {buf}, see |bufname()| above. {first} and {last} are used like with |getline()|. Note that when using |line()| this refers to the current buffer. Use "$" - to refer to the last line in buffer {expr}. + to refer to the last line in buffer {buf}. Can also be used as a |method|: > GetBuffer()->deletebufline(1) @@ -4307,10 +4311,10 @@ digraph_setlist({digraphlist}) *digraph_setlist()* display an error message. -echoraw({expr}) *echoraw()* - Output {expr} as-is, including unprintable characters. This - can be used to output a terminal code. For example, to disable - modifyOtherKeys: > +echoraw({string}) *echoraw()* + Output {string} as-is, including unprintable characters. + This can be used to output a terminal code. For example, to + disable modifyOtherKeys: > call echoraw(&t_TE) < and to enable it again: > call echoraw(&t_TI) @@ -4551,6 +4555,7 @@ exists_compiled({expr}) *exists_compiled()* {expr} must be a literal string. *E1232* Can only be used in a |:def| function. *E1233* + This does not work to check for arguments or local variables. exp({expr}) *exp()* @@ -4569,9 +4574,9 @@ exp({expr}) *exp()* {only available when compiled with the |+float| feature} -expand({expr} [, {nosuf} [, {list}]]) *expand()* - Expand wildcards and the following special keywords in {expr}. - 'wildignorecase' applies. +expand({string} [, {nosuf} [, {list}]]) *expand()* + Expand wildcards and the following special keywords in + {string}. 'wildignorecase' applies. If {list} is given and it is |TRUE|, a List will be returned. Otherwise the result is a String and when there are several @@ -4580,12 +4585,12 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()* file name contains a space] If the expansion fails, the result is an empty string. A name - for a non-existing file is not included, unless {expr} does + for a non-existing file is not included, unless {string} does not start with '%', '#' or '<', see below. - When {expr} starts with '%', '#' or '<', the expansion is done - like for the |cmdline-special| variables with their associated - modifiers. Here is a short overview: + When {string} starts with '%', '#' or '<', the expansion is + done like for the |cmdline-special| variables with their + associated modifiers. Here is a short overview: % current file name # alternate file name @@ -4636,7 +4641,7 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()* buffer with no name, results in the current directory, with a '/' added. - When {expr} does not start with '%', '#' or '<', it is + When {string} does not start with '%', '#' or '<', it is expanded like a file name is expanded on the command line. 'suffixes' and 'wildignore' are used, unless the optional {nosuf} argument is given and it is |TRUE|. @@ -4660,11 +4665,12 @@ expand({expr} [, {nosuf} [, {list}]]) *expand()* Can also be used as a |method|: > Getpattern()->expand() -expandcmd({expr}) *expandcmd()* - Expand special items in {expr} like what is done for an Ex - command such as `:edit`. This expands special keywords, like - with |expand()|, and environment variables, anywhere in - {expr}. "~user" and "~/path" are only expanded at the start. +expandcmd({string}) *expandcmd()* + Expand special items in String {string} like what is done for + an Ex command such as `:edit`. This expands special keywords, + like with |expand()|, and environment variables, anywhere in + {string}. "~user" and "~/path" are only expanded at the + start. Returns the expanded string. Example: > :echo expandcmd('make %<.o') @@ -5083,8 +5089,8 @@ fullcommand({name}) *fullcommand()* Get the full command name from a short abbreviated command name; see |20.2| for details on command abbreviations. - {name} may start with a `:` and can include a [range], these - are skipped and not returned. + The string argument {name} may start with a `:` and can + include a [range], these are skipped and not returned. Returns an empty string if a command doesn't exist or if it's ambiguous (for user-defined functions). @@ -5240,7 +5246,7 @@ get({func}, {what}) myfunc->get(what) < *getbufinfo()* -getbufinfo([{expr}]) +getbufinfo([{buf}]) getbufinfo([{dict}]) Get information about buffers as a List of Dictionaries. @@ -5254,8 +5260,8 @@ getbufinfo([{dict}]) bufloaded include only loaded buffers. bufmodified include only modified buffers. - Otherwise, {expr} specifies a particular buffer to return - information for. For the use of {expr}, see |bufname()| + Otherwise, {buf} specifies a particular buffer to return + information for. For the use of {buf}, see |bufname()| above. If the buffer is found the returned List has one item. Otherwise the result is an empty list. @@ -5314,12 +5320,12 @@ getbufinfo([{dict}]) < *getbufline()* -getbufline({expr}, {lnum} [, {end}]) +getbufline({buf}, {lnum} [, {end}]) Return a |List| with the lines starting from {lnum} to {end} - (inclusive) in the buffer {expr}. If {end} is omitted, a + (inclusive) in the buffer {buf}. If {end} is omitted, a |List| with only the line {lnum} is returned. - For the use of {expr}, see |bufname()| above. + For the use of {buf}, see |bufname()| above. For {lnum} and {end} "$" can be used for the last line of the buffer. Otherwise a number must be used. @@ -5341,10 +5347,11 @@ getbufline({expr}, {lnum} [, {end}]) < Can also be used as a |method|: > GetBufnr()->getbufline(lnum) -getbufvar({expr}, {varname} [, {def}]) *getbufvar()* +getbufvar({buf}, {varname} [, {def}]) *getbufvar()* The result is the value of option or local buffer variable - {varname} in buffer {expr}. Note that the name without "b:" + {varname} in buffer {buf}. Note that the name without "b:" must be used. + The {varname} argument is a string. When {varname} is empty returns a |Dictionary| with all the buffer-local variables. When {varname} is equal to "&" returns a |Dictionary| with all @@ -5354,7 +5361,7 @@ getbufvar({expr}, {varname} [, {def}]) *getbufvar()* This also works for a global or buffer-local option, but it doesn't work for a global variable, window-local variable or window-local option. - For the use of {expr}, see |bufname()| above. + For the use of {buf}, see |bufname()| above. When the buffer or variable doesn't exist {def} or an empty string is returned, there is no error message. Examples: > @@ -5364,9 +5371,9 @@ getbufvar({expr}, {varname} [, {def}]) *getbufvar()* < Can also be used as a |method|: > GetBufnr()->getbufvar(varname) < -getchangelist([{expr}]) *getchangelist()* - Returns the |changelist| for the buffer {expr}. For the use - of {expr}, see |bufname()| above. If buffer {expr} doesn't +getchangelist([{buf}]) *getchangelist()* + Returns the |changelist| for the buffer {buf}. For the use + of {buf}, see |bufname()| above. If buffer {buf} doesn't exist, an empty list is returned. The returned list contains two entries: a list with the change @@ -5376,7 +5383,7 @@ getchangelist([{expr}]) *getchangelist()* col column number coladd column offset for 'virtualedit' lnum line number - If buffer {expr} is the current buffer, then the current + If buffer {buf} is the current buffer, then the current position refers to the position in the list. For other buffers, it is set to the length of the list. @@ -5481,9 +5488,9 @@ getcharmod() *getcharmod()* *getcharpos()* getcharpos({expr}) - Get the position for {expr}. Same as |getpos()| but the column - number in the returned List is a character index instead of - a byte index. + Get the position for String {expr}. Same as |getpos()| but the + column number in the returned List is a character index + instead of a byte index. If |getpos()| returns a very large column number, such as 2147483647, then getcharpos() will return the character index of the last character. @@ -5569,9 +5576,9 @@ getcmdwintype() *getcmdwintype()* when not in the command-line window. getcompletion({pat}, {type} [, {filtered}]) *getcompletion()* - Return a list of command-line completion matches. {type} - specifies what for. The following completion types are - supported: + Return a list of command-line completion matches. The String + {type} argument specifies what for. The following completion + types are supported: arglist file names in argument list augroup autocmd groups @@ -5708,8 +5715,11 @@ getcwd([{winnr} [, {tabnr}]]) GetWinnr()->getcwd() getenv({name}) *getenv()* - Return the value of environment variable {name}. - When the variable does not exist |v:null| is returned. That + Return the value of environment variable {name}. The {name} + argume |