chore: fix typos (#17250)

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Dani Dickstein <daniel.dickstein@gmail.com>
Co-authored-by: Axel Dahlberg <git@valleymnt.com>
This commit is contained in:
dundargoc 2022-02-08 01:19:06 +01:00 committed by GitHub
parent 9259bc6215
commit 64116d7850
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 62 additions and 59 deletions

View File

@ -186,7 +186,7 @@ About the `functions` map:
a type name, e.g. `nvim_buf_get_lines` is the `get_lines` method of a type name, e.g. `nvim_buf_get_lines` is the `get_lines` method of
a Buffer instance. |dev-api| a Buffer instance. |dev-api|
- Global functions have the "method=false" flag and are prefixed with just - Global functions have the "method=false" flag and are prefixed with just
`nvim_`, e.g. `nvim_get_buffers`. `nvim_`, e.g. `nvim_list_bufs`.
*api-mapping* *api-mapping*
External programs (clients) can use the metadata to discover the API, using External programs (clients) can use the metadata to discover the API, using

View File

@ -526,7 +526,7 @@ DirChanged After the |current-directory| was changed.
"auto" to trigger on 'autochdir'. "auto" to trigger on 'autochdir'.
Sets these |v:event| keys: Sets these |v:event| keys:
cwd: current working directory cwd: current working directory
scope: "global", "tab", "window" scope: "global", "tabpage", "window"
changed_window: v:true if we fired the event changed_window: v:true if we fired the event
switching window (or tab) switching window (or tab)
<afile> is set to the new directory name. <afile> is set to the new directory name.

View File

@ -22,8 +22,10 @@ acos({expr}) Float arc cosine of {expr}
add({object}, {item}) List/Blob append {item} to {object} add({object}, {item}) List/Blob append {item} to {object}
and({expr}, {expr}) Number bitwise AND and({expr}, {expr}) Number bitwise AND
api_info() Dict api metadata api_info() Dict api metadata
append({lnum}, {string}) Number append {string} below line {lnum} append({lnum}, {text}) Number append {text} below line {lnum}
append({lnum}, {list}) Number append lines {list} below line {lnum} appendbufline({expr}, {lnum}, {text})
Number append {text} below line {lnum}
in buffer {expr}
argc([{winid}]) Number number of files in the argument list argc([{winid}]) Number number of files in the argument list
argidx() Number current index in the argument list argidx() Number current index in the argument list
arglistid([{winnr} [, {tabnr}]]) Number argument list id arglistid([{winnr} [, {tabnr}]]) Number argument list id
@ -52,7 +54,7 @@ assert_notmatch({pat}, {text} [, {msg}])
assert_report({msg}) Number report a test failure assert_report({msg}) Number report a test failure
assert_true({actual} [, {msg}]) Number assert {actual} is true assert_true({actual} [, {msg}]) Number assert {actual} is true
atan({expr}) Float arc tangent of {expr} atan({expr}) Float arc tangent of {expr}
atan2({expr}, {expr}) Float arc tangent of {expr1} / {expr2} atan2({expr1}, {expr2}) Float arc tangent of {expr1} / {expr2}
browse({save}, {title}, {initdir}, {default}) browse({save}, {title}, {initdir}, {default})
String put up a file requester String put up a file requester
browsedir({title}, {initdir}) String put up a directory requester browsedir({title}, {initdir}) String put up a directory requester
@ -72,9 +74,9 @@ call({func}, {arglist} [, {dict}])
any call {func} with arguments {arglist} any call {func} with arguments {arglist}
ceil({expr}) Float round {expr} up ceil({expr}) Float round {expr} up
changenr() Number current change number changenr() Number current change number
chanclose({id}[, {stream}]) Number Closes a channel or one of its streams chanclose({id} [, {stream}]) Number Closes a channel or one of its streams
chansend({id}, {data}) Number Writes {data} to channel chansend({id}, {data}) Number Writes {data} to channel
char2nr({expr}[, {utf8}]) Number ASCII/UTF-8 value of first char in {expr} char2nr({expr} [, {utf8}]) Number ASCII/UTF-8 value of first char in {expr}
charcol({expr}) Number column number of cursor or mark charcol({expr}) Number column number of cursor or mark
charidx({string}, {idx} [, {countcc}]) charidx({string}, {idx} [, {countcc}])
Number char index of byte {idx} in {string} Number char index of byte {idx} in {string}
@ -91,8 +93,8 @@ confirm({msg} [, {choices} [, {default} [, {type}]]])
copy({expr}) any make a shallow copy of {expr} copy({expr}) any make a shallow copy of {expr}
cos({expr}) Float cosine of {expr} cos({expr}) Float cosine of {expr}
cosh({expr}) Float hyperbolic cosine of {expr} cosh({expr}) Float hyperbolic cosine of {expr}
count({list}, {expr} [, {ic} [, {start}]]) count({comp}, {expr} [, {ic} [, {start}]])
Number count how many {expr} are in {list} Number count how many {expr} are in {comp}
cscope_connection([{num}, {dbpath} [, {prepend}]]) cscope_connection([{num}, {dbpath} [, {prepend}]])
Number checks existence of cscope connection Number checks existence of cscope connection
ctxget([{index}]) Dict return the |context| dict at {index} ctxget([{index}]) Dict return the |context| dict at {index}
@ -100,7 +102,7 @@ ctxpop() none pop and restore |context| from the
|context-stack| |context-stack|
ctxpush([{types}]) none push the current |context| to the ctxpush([{types}]) none push the current |context| to the
|context-stack| |context-stack|
ctxset({context}[, {index}]) none set |context| at {index} ctxset({context} [, {index}]) none set |context| at {index}
ctxsize() Number return |context-stack| size ctxsize() Number return |context-stack| size
cursor({lnum}, {col} [, {off}]) cursor({lnum}, {col} [, {off}])
Number move cursor to {lnum}, {col}, {off} Number move cursor to {lnum}, {col}, {off}
@ -108,7 +110,7 @@ cursor({list}) Number move cursor to position in {list}
debugbreak({pid}) Number interrupt process being debugged debugbreak({pid}) Number interrupt process being debugged
deepcopy({expr} [, {noref}]) any make a full copy of {expr} deepcopy({expr} [, {noref}]) any make a full copy of {expr}
delete({fname} [, {flags}]) Number delete the file or directory {fname} delete({fname} [, {flags}]) Number delete the file or directory {fname}
deletebufline({buf}, {first}[, {last}]) deletebufline({buf}, {first} [, {last}])
Number delete lines from buffer {buf} Number delete lines from buffer {buf}
dictwatcheradd({dict}, {pattern}, {callback}) dictwatcheradd({dict}, {pattern}, {callback})
Start watching a dictionary Start watching a dictionary
@ -212,7 +214,7 @@ gettabvar({nr}, {varname} [, {def}])
gettabwinvar({tabnr}, {winnr}, {name} [, {def}]) gettabwinvar({tabnr}, {winnr}, {name} [, {def}])
any {name} in {winnr} in tab page {tabnr} any {name} in {winnr} in tab page {tabnr}
gettagstack([{nr}]) Dict get the tag stack of window {nr} gettagstack([{nr}]) Dict get the tag stack of window {nr}
getwininfo([{winid}]) List list of windows getwininfo([{winid}]) List list of info about each window
getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window getwinpos([{timeout}]) List X and Y coord in pixels of the Vim window
getwinposx() Number X coord in pixels of Vim window getwinposx() Number X coord in pixels of Vim window
getwinposy() Number Y coord in pixels of Vim window getwinposy() Number Y coord in pixels of Vim window
@ -262,9 +264,9 @@ items({dict}) List key-value pairs in {dict}
jobpid({id}) Number Returns pid of a job. jobpid({id}) Number Returns pid of a job.
jobresize({id}, {width}, {height}) jobresize({id}, {width}, {height})
Number Resize pseudo terminal window of a job Number Resize pseudo terminal window of a job
jobstart({cmd}[, {opts}]) Number Spawns {cmd} as a job jobstart({cmd} [, {opts}]) Number Spawns {cmd} as a job
jobstop({id}) Number Stops a job jobstop({id}) Number Stops a job
jobwait({ids}[, {timeout}]) Number Wait for a set of jobs jobwait({ids} [, {timeout}]) Number Wait for a set of jobs
join({list} [, {sep}]) String join {list} items into one String join({list} [, {sep}]) String join {list} items into one String
json_decode({expr}) any Convert {expr} from JSON json_decode({expr}) any Convert {expr} from JSON
json_encode({expr}) String Convert {expr} to JSON json_encode({expr}) String Convert {expr} to JSON
@ -279,32 +281,32 @@ list2str({list} [, {utf8}]) String turn numbers in {list} into a String
localtime() Number current time localtime() Number current time
log({expr}) Float natural logarithm (base e) of {expr} log({expr}) Float natural logarithm (base e) of {expr}
log10({expr}) Float logarithm of Float {expr} to base 10 log10({expr}) Float logarithm of Float {expr} to base 10
luaeval({expr}[, {expr}]) any evaluate Lua expression luaeval({expr} [, {expr}]) any evaluate |Lua| expression
map({expr1}, {expr2}) List/Dict change each item in {expr1} to {expr} map({expr1}, {expr2}) List/Dict change each item in {expr1} to {expr}
maparg({name}[, {mode} [, {abbr} [, {dict}]]]) maparg({name} [, {mode} [, {abbr} [, {dict}]]])
String or Dict String or Dict
rhs of mapping {name} in mode {mode} rhs of mapping {name} in mode {mode}
mapcheck({name}[, {mode} [, {abbr}]]) mapcheck({name} [, {mode} [, {abbr}]])
String check for mappings matching {name} String check for mappings matching {name}
match({expr}, {pat}[, {start}[, {count}]]) match({expr}, {pat} [, {start} [, {count}]])
Number position where {pat} matches in {expr} Number position where {pat} matches in {expr}
matchadd({group}, {pattern}[, {priority}[, {id}]]) matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
Number highlight {pattern} with {group} Number highlight {pattern} with {group}
matchaddpos({group}, {list}[, {priority}[, {id}]]) matchaddpos({group}, {pos} [, {priority} [, {id} [, {dict}]]])
Number highlight positions with {group} Number highlight positions with {group}
matcharg({nr}) List arguments of |:match| matcharg({nr}) List arguments of |:match|
matchdelete({id} [, {win}]) Number delete match identified by {id} matchdelete({id} [, {win}]) Number delete match identified by {id}
matchend({expr}, {pat}[, {start}[, {count}]]) matchend({expr}, {pat} [, {start} [, {count}]])
Number position where {pat} ends in {expr} Number position where {pat} ends in {expr}
matchfuzzy({list}, {str} [, {dict}]) matchfuzzy({list}, {str} [, {dict}])
List fuzzy match {str} in {list} List fuzzy match {str} in {list}
matchfuzzypos({list}, {str} [, {dict}]) matchfuzzypos({list}, {str} [, {dict}])
List fuzzy match {str} in {list} List fuzzy match {str} in {list}
matchlist({expr}, {pat}[, {start}[, {count}]]) matchlist({expr}, {pat} [, {start} [, {count}]])
List match and submatches of {pat} in {expr} List match and submatches of {pat} in {expr}
matchstr({expr}, {pat}[, {start}[, {count}]]) matchstr({expr}, {pat} [, {start} [, {count}]])
String {count}'th match of {pat} in {expr} String {count}'th match of {pat} in {expr}
matchstrpos({expr}, {pat}[, {start}[, {count}]]) matchstrpos({expr}, {pat} [, {start} [, {count}]])
List {count}'th match of {pat} in {expr} List {count}'th match of {pat} in {expr}
max({expr}) Number maximum value of items in {expr} max({expr}) Number maximum value of items in {expr}
menu_get({path} [, {modes}]) List description of |menus| matched by {path} menu_get({path} [, {modes}]) List description of |menus| matched by {path}
@ -315,7 +317,7 @@ mode([expr]) String current editing mode
msgpackdump({list} [, {type}]) List/Blob dump objects to msgpack msgpackdump({list} [, {type}]) List/Blob dump objects to msgpack
msgpackparse({data}) List parse msgpack to a list of objects msgpackparse({data}) List parse msgpack to a list of objects
nextnonblank({lnum}) Number line nr of non-blank line >= {lnum} nextnonblank({lnum}) Number line nr of non-blank line >= {lnum}
nr2char({expr}[, {utf8}]) String single char with ASCII/UTF-8 value {expr} nr2char({expr} [, {utf8}]) String single char with ASCII/UTF-8 value {expr}
nvim_...({args}...) any call nvim |api| functions nvim_...({args}...) any call nvim |api| functions
or({expr}, {expr}) Number bitwise OR or({expr}, {expr}) Number bitwise OR
pathshorten({expr} [, {len}]) String shorten directory names in a path pathshorten({expr} [, {len}]) String shorten directory names in a path
@ -365,9 +367,9 @@ resolve({filename}) String get filename a shortcut points to
reverse({list}) List reverse {list} in-place reverse({list}) List reverse {list} in-place
round({expr}) Float round off {expr} round({expr}) Float round off {expr}
rubyeval({expr}) any evaluate |Ruby| expression rubyeval({expr}) any evaluate |Ruby| expression
rpcnotify({channel}, {event}[, {args}...]) rpcnotify({channel}, {event} [, {args}...])
Sends an |RPC| notification to {channel} Sends an |RPC| notification to {channel}
rpcrequest({channel}, {method}[, {args}...]) rpcrequest({channel}, {method} [, {args}...])
Sends an |RPC| request to {channel} Sends an |RPC| request to {channel}
screenattr({row}, {col}) Number attribute at screen position screenattr({row}, {col}) Number attribute at screen position
screenchar({row}, {col}) Number character at screen position screenchar({row}, {col}) Number character at screen position
@ -390,8 +392,8 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]])
server2client({clientid}, {string}) server2client({clientid}, {string})
Number send reply string Number send reply string
serverlist() String get a list of available servers serverlist() String get a list of available servers
setbufline( {expr}, {lnum}, {line}) setbufline({expr}, {lnum}, {text})
Number set line {lnum} to {line} in buffer Number set line {lnum} to {text} in buffer
{expr} {expr}
setbufvar({buf}, {varname}, {val}) set {varname} in buffer {buf} to {val} setbufvar({buf}, {varname}, {val}) set {varname} in buffer {buf} to {val}
setcharpos({expr}, {list}) Number set the {expr} position to {list} setcharpos({expr}, {list}) Number set the {expr} position to {list}
@ -410,7 +412,7 @@ setpos({expr}, {list}) Number set the {expr} position to {list}
setqflist({list} [, {action}]) Number modify quickfix list using {list} setqflist({list} [, {action}]) Number modify quickfix list using {list}
setqflist({list}, {action}, {what}) setqflist({list}, {action}, {what})
Number modify specific quickfix list props Number modify specific quickfix list props
setreg({n}, {v}[, {opt}]) Number set register to value and type setreg({n}, {v} [, {opt}]) Number set register to value and type
settabvar({nr}, {varname}, {val}) set {varname} in tab page {nr} to {val} settabvar({nr}, {varname}, {val}) set {varname} in tab page {nr} to {val}
settabwinvar({tabnr}, {winnr}, {varname}, {val}) set {varname} in window settabwinvar({tabnr}, {winnr}, {varname}, {val}) set {varname} in window
{winnr} in tab page {tabnr} to {val} {winnr} in tab page {tabnr} to {val}
@ -495,9 +497,9 @@ system({cmd} [, {input}]) String output of shell command/filter {cmd}
systemlist({cmd} [, {input}]) List output of shell command/filter {cmd} systemlist({cmd} [, {input}]) List output of shell command/filter {cmd}
tabpagebuflist([{arg}]) List list of buffer numbers in tab page tabpagebuflist([{arg}]) List list of buffer numbers in tab page
tabpagenr([{arg}]) Number number of current or last tab page tabpagenr([{arg}]) Number number of current or last tab page
tabpagewinnr({tabarg}[, {arg}]) tabpagewinnr({tabarg} [, {arg}])
Number number of current window in tab page Number number of current window in tab page
taglist({expr}[, {filename}]) List list of tags matching {expr} taglist({expr} [, {filename}]) List list of tags matching {expr}
tagfiles() List tags files used tagfiles() List tags files used
tan({expr}) Float tangent of {expr} tan({expr}) Float tangent of {expr}
tanh({expr}) Float hyperbolic tangent of {expr} tanh({expr}) Float hyperbolic tangent of {expr}
@ -524,7 +526,7 @@ uniq({list} [, {func} [, {dict}]])
values({dict}) List values in {dict} values({dict}) List values in {dict}
virtcol({expr}) Number screen column of cursor or mark virtcol({expr}) Number screen column of cursor or mark
visualmode([expr]) String last visual mode used visualmode([expr]) String last visual mode used
wait({timeout}, {condition}[, {interval}]) wait({timeout}, {condition} [, {interval}])
Number Wait until {condition} is satisfied Number Wait until {condition} is satisfied
wildmenumode() Number whether 'wildmenu' mode is active wildmenumode() Number whether 'wildmenu' mode is active
win_execute({id}, {command} [, {silent}]) win_execute({id}, {command} [, {silent}])
@ -999,7 +1001,7 @@ changenr() *changenr()*
redo it is the number of the redone change. After undo it is redo it is the number of the redone change. After undo it is
one less than the number of the undone change. one less than the number of the undone change.
chanclose({id}[, {stream}]) *chanclose()* chanclose({id} [, {stream}]) *chanclose()*
Close a channel or a specific stream associated with it. Close a channel or a specific stream associated with it.
For a job, {stream} can be one of "stdin", "stdout", For a job, {stream} can be one of "stdin", "stdout",
"stderr" or "rpc" (closes stdin/stdout for a job started "stderr" or "rpc" (closes stdin/stdout for a job started
@ -1443,7 +1445,7 @@ ctxpush([{types}]) *ctxpush()*
which |context-types| to include in the pushed context. which |context-types| to include in the pushed context.
Otherwise, all context types are included. Otherwise, all context types are included.
ctxset({context}[, {index}]) *ctxset()* ctxset({context} [, {index}]) *ctxset()*
Sets the |context| at {index} from the top of the Sets the |context| at {index} from the top of the
|context-stack| to that represented by {context}. |context-stack| to that represented by {context}.
{context} is a Dictionary with context data (|context-dict|). {context} is a Dictionary with context data (|context-dict|).
@ -1487,7 +1489,7 @@ cursor({list})
Can also be used as a |method|: > Can also be used as a |method|: >
GetCursorPos()->cursor() GetCursorPos()->cursor()
deepcopy({expr}[, {noref}]) *deepcopy()* *E698* deepcopy({expr} [, {noref}]) *deepcopy()* *E698*
Make a copy of {expr}. For Numbers and Strings this isn't Make a copy of {expr}. For Numbers and Strings this isn't
different from using {expr} directly. different from using {expr} directly.
When {expr} is a |List| a full copy is created. This means When {expr} is a |List| a full copy is created. This means
@ -1530,7 +1532,7 @@ delete({fname} [, {flags}]) *delete()*
Can also be used as a |method|: > Can also be used as a |method|: >
GetName()->delete() GetName()->delete()
deletebufline({buf}, {first}[, {last}]) *deletebufline()* deletebufline({buf}, {first} [, {last}]) *deletebufline()*
Delete lines {first} to {last} (inclusive) from buffer {buf}. Delete lines {first} to {last} (inclusive) from buffer {buf}.
If {last} is omitted then delete line {first} only. If {last} is omitted then delete line {first} only.
On success 0 is returned, on failure 1 is returned. On success 0 is returned, on failure 1 is returned.
@ -1540,7 +1542,7 @@ deletebufline({buf}, {first}[, {last}]) *deletebufline()*
For the use of {buf}, see |bufname()| above. For the use of {buf}, see |bufname()| above.
{first} and {last} are used like with |setline()|. Note that {first} and {last} are used like with |getline()|. Note that
when using |line()| this refers to the current buffer. Use "$" when using |line()| this refers to the current buffer. Use "$"
to refer to the last line in buffer {buf}. to refer to the last line in buffer {buf}.
@ -2865,7 +2867,7 @@ getcursorcharpos([{winid}])
Can also be used as a |method|: > Can also be used as a |method|: >
GetWinid()->getcursorcharpos() GetWinid()->getcursorcharpos()
getcwd([{winnr}[, {tabnr}]]) *getcwd()* getcwd([{winnr} [, {tabnr}]]) *getcwd()*
With no arguments, returns the name of the effective With no arguments, returns the name of the effective
|current-directory|. With {winnr} or {tabnr} the working |current-directory|. With {winnr} or {tabnr} the working
directory of that scope is returned, and 'autochdir' is directory of that scope is returned, and 'autochdir' is
@ -3022,7 +3024,7 @@ getline({lnum} [, {end}])
< To get lines from another buffer see |getbufline()| < To get lines from another buffer see |getbufline()|
getloclist({nr},[, {what}]) *getloclist()* getloclist({nr} [, {what}]) *getloclist()*
Returns a |List| with all the entries in the location list for Returns a |List| with all the entries in the location list for
window {nr}. {nr} can be the window number or the |window-ID|. window {nr}. {nr} can be the window number or the |window-ID|.
When {nr} is zero the current window is used. When {nr} is zero the current window is used.
@ -3649,7 +3651,7 @@ has_key({dict}, {key}) *has_key()*
Can also be used as a |method|: > Can also be used as a |method|: >
mydict->has_key(key) mydict->has_key(key)
haslocaldir([{winnr}[, {tabnr}]]) *haslocaldir()* haslocaldir([{winnr} [, {tabnr}]]) *haslocaldir()*
The result is a Number, which is 1 when the window has set a The result is a Number, which is 1 when the window has set a
local path via |:lcd| or when {winnr} is -1 and the tabpage local path via |:lcd| or when {winnr} is -1 and the tabpage
has set a local path via |:tcd|, otherwise 0. has set a local path via |:tcd|, otherwise 0.
@ -4151,7 +4153,7 @@ jobresize({job}, {width}, {height}) *jobresize()*
columns and {height} rows. columns and {height} rows.
Fails if the job was not started with `"pty":v:true`. Fails if the job was not started with `"pty":v:true`.
jobstart({cmd}[, {opts}]) *jobstart()* jobstart({cmd} [, {opts}]) *jobstart()*
Spawns {cmd} as a job. Spawns {cmd} as a job.
If {cmd} is a List it runs directly (no 'shell'). If {cmd} is a List it runs directly (no 'shell').
If {cmd} is a String it runs in the 'shell', like this: > If {cmd} is a String it runs in the 'shell', like this: >
@ -4238,7 +4240,7 @@ jobstop({id}) *jobstop()*
Returns 1 for valid job id, 0 for invalid id, including jobs have Returns 1 for valid job id, 0 for invalid id, including jobs have
exited or stopped. exited or stopped.
jobwait({jobs}[, {timeout}]) *jobwait()* jobwait({jobs} [, {timeout}]) *jobwait()*
Waits for jobs and their |on_exit| handlers to complete. Waits for jobs and their |on_exit| handlers to complete.
{jobs} is a List of |job-id|s to wait for. {jobs} is a List of |job-id|s to wait for.
@ -4495,7 +4497,7 @@ log10({expr}) *log10()*
Can also be used as a |method|: > Can also be used as a |method|: >
Compute()->log10() Compute()->log10()
luaeval({expr}[, {expr}]) luaeval({expr} [, {expr}])
Evaluate Lua expression {expr} and return its result converted Evaluate Lua expression {expr} and return its result converted
to Vim data structures. See |lua-eval| for more details. to Vim data structures. See |lua-eval| for more details.
@ -4715,7 +4717,7 @@ match({expr}, {pat} [, {start} [, {count}]]) *match()*
GetList()->match('word') GetList()->match('word')
< <
*matchadd()* *E798* *E799* *E801* *E957* *matchadd()* *E798* *E799* *E801* *E957*
matchadd({group}, {pattern}[, {priority}[, {id} [, {dict}]]]) matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
Defines a pattern to be highlighted in the current window (a Defines a pattern to be highlighted in the current window (a
"match"). It will be highlighted with {group}. Returns an "match"). It will be highlighted with {group}. Returns an
identification number (ID), which can be used to delete the identification number (ID), which can be used to delete the
@ -6028,19 +6030,19 @@ round({expr}) *round()*
Can also be used as a |method|: > Can also be used as a |method|: >
Compute()->round() Compute()->round()
rpcnotify({channel}, {event}[, {args}...]) *rpcnotify()* rpcnotify({channel}, {event} [, {args}...]) *rpcnotify()*
Sends {event} to {channel} via |RPC| and returns immediately. Sends {event} to {channel} via |RPC| and returns immediately.
If {channel} is 0, the event is broadcast to all channels. If {channel} is 0, the event is broadcast to all channels.
Example: > Example: >
:au VimLeave call rpcnotify(0, "leaving") :au VimLeave call rpcnotify(0, "leaving")
rpcrequest({channel}, {method}[, {args}...]) *rpcrequest()* rpcrequest({channel}, {method} [, {args}...]) *rpcrequest()*
Sends a request to {channel} to invoke {method} via Sends a request to {channel} to invoke {method} via
|RPC| and blocks until a response is received. |RPC| and blocks until a response is received.
Example: > Example: >
:let result = rpcrequest(rpc_chan, "func", 1, 2, 3) :let result = rpcrequest(rpc_chan, "func", 1, 2, 3)
rpcstart({prog}[, {argv}]) *rpcstart()* rpcstart({prog} [, {argv}]) *rpcstart()*
Deprecated. Replace > Deprecated. Replace >
:let id = rpcstart('prog', ['arg1', 'arg2']) :let id = rpcstart('prog', ['arg1', 'arg2'])
< with > < with >
@ -7808,11 +7810,11 @@ substitute({string}, {pat}, {sub}, {flags}) *substitute()*
swapinfo({fname}) *swapinfo()* swapinfo({fname}) *swapinfo()*
The result is a dictionary, which holds information about the The result is a dictionary, which holds information about the
swapfile {fname}. The available fields are: swapfile {fname}. The available fields are:
version VIM version version Vim version
user user name user user name
host host name host host name
fname original file name fname original file name
pid PID of the VIM process that created the swap pid PID of the Vim process that created the swap
file file
mtime last modification time in seconds mtime last modification time in seconds
inode Optional: INODE number of the file inode Optional: INODE number of the file
@ -8123,7 +8125,7 @@ tempname() *tempname()* *temp-file-name*
For MS-Windows forward slashes are used when the 'shellslash' For MS-Windows forward slashes are used when the 'shellslash'
option is set or when 'shellcmdflag' starts with '-'. option is set or when 'shellcmdflag' starts with '-'.
termopen({cmd}[, {opts}]) *termopen()* termopen({cmd} [, {opts}]) *termopen()*
Spawns {cmd} in a new pseudo-terminal session connected Spawns {cmd} in a new pseudo-terminal session connected
to the current buffer. {cmd} is the same as the one passed to to the current buffer. {cmd} is the same as the one passed to
|jobstart()|. This function fails if the current buffer is |jobstart()|. This function fails if the current buffer is
@ -8482,7 +8484,7 @@ visualmode([{expr}]) *visualmode()*
a non-empty String, then the Visual mode will be cleared and a non-empty String, then the Visual mode will be cleared and
the old value is returned. See |non-zero-arg|. the old value is returned. See |non-zero-arg|.
wait({timeout}, {condition}[, {interval}]) *wait()* wait({timeout}, {condition} [, {interval}]) *wait()*
Waits until {condition} evaluates to |TRUE|, where {condition} Waits until {condition} evaluates to |TRUE|, where {condition}
is a |Funcref| or |string| containing an expression. is a |Funcref| or |string| containing an expression.

View File

@ -465,8 +465,8 @@ flag when defining the function, it is not relevant when executing it. >
:set cpo-=C :set cpo-=C
< <
*line-continuation-comment* *line-continuation-comment*
To add a comment in between the lines start with '\" '. Notice the space To add a comment in between the lines start with '"\ '. Notice the space
after the double quote. Example: > after the backslash. Example: >
let array = [ let array = [
"\ first entry comment "\ first entry comment
\ 'first', \ 'first',

View File

@ -322,6 +322,8 @@ coerced to strings. See |id()| for more details, currently it uses
|c_CTRL-R| pasting a non-special register into |cmdline| omits the last <CR>. |c_CTRL-R| pasting a non-special register into |cmdline| omits the last <CR>.
|CursorMoved| always triggers when moving between windows.
Lua interface (|lua.txt|): Lua interface (|lua.txt|):
- `:lua print("a\0b")` will print `a^@b`, like with `:echomsg "a\nb"` . In Vim - `:lua print("a\0b")` will print `a^@b`, like with `:echomsg "a\nb"` . In Vim
@ -483,7 +485,6 @@ Commands:
:tearoff :tearoff
Compile-time features: Compile-time features:
EBCDIC
Emacs tags support Emacs tags support
X11 integration (see |x11-selection|) X11 integration (see |x11-selection|)

View File

@ -78,7 +78,7 @@ end
--- ---
--- Example: --- Example:
--- <pre> --- <pre>
--- vim.ui.input({ prompt = 'Select value for shiftwidth: ' }, function(input) --- vim.ui.input({ prompt = 'Enter value for shiftwidth: ' }, function(input)
--- vim.o.shiftwidth = tonumber(input) --- vim.o.shiftwidth = tonumber(input)
--- end) --- end)
--- </pre> --- </pre>

View File

@ -55,7 +55,7 @@ struct map_arguments {
char_u *orig_rhs; /// The original text of the {rhs}. char_u *orig_rhs; /// The original text of the {rhs}.
size_t orig_rhs_len; size_t orig_rhs_len;
char *desc; /// map escription char *desc; /// map description
}; };
typedef struct map_arguments MapArguments; typedef struct map_arguments MapArguments;
#define MAP_ARGUMENTS_INIT { false, false, false, false, false, false, false, \ #define MAP_ARGUMENTS_INIT { false, false, false, false, false, false, false, \

View File

@ -20,7 +20,7 @@ func s:screen_lines2(lnums, lnume, width) abort
return ScreenLines([a:lnums, a:lnume], a:width) return ScreenLines([a:lnums, a:lnume], a:width)
endfunc endfunc
func! s:compare_lines(expect, actual) func s:compare_lines(expect, actual)
call assert_equal(join(a:expect, "\n"), join(a:actual, "\n")) call assert_equal(join(a:expect, "\n"), join(a:actual, "\n"))
endfunc endfunc

View File

@ -227,7 +227,7 @@ static void forward_modified_utf8(TermInput *input, TermKeyKey *key)
&& !(key->modifiers & TERMKEY_KEYMOD_SHIFT) && !(key->modifiers & TERMKEY_KEYMOD_SHIFT)
&& ASCII_ISUPPER(key->code.codepoint)) { && ASCII_ISUPPER(key->code.codepoint)) {
assert(len <= 62); assert(len <= 62);
// Make remove for the S- // Make room for the S-
memmove(buf + 3, buf + 1, len - 1); memmove(buf + 3, buf + 1, len - 1);
buf[1] = 'S'; buf[1] = 'S';
buf[2] = '-'; buf[2] = '-';