aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-08-03 03:47:16 +0200
committerGitHub <noreply@github.com>2022-08-03 09:47:16 +0800
commitb8dcbcc732baf84fc48d6b272c3ade0bcb129b3b (patch)
tree4818e98e9211d71d21eec359f29721e2b3ff3f2e /runtime
parentcc1ceebf8f13aed1ec0cbe0ff1ad7b2d8a6f10be (diff)
downloadrneovim-b8dcbcc732baf84fc48d6b272c3ade0bcb129b3b.tar.gz
rneovim-b8dcbcc732baf84fc48d6b272c3ade0bcb129b3b.tar.bz2
rneovim-b8dcbcc732baf84fc48d6b272c3ade0bcb129b3b.zip
docs: fix typos (#19588)
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: notomo <notomo.motono@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/api.txt2
-rw-r--r--runtime/doc/builtin.txt2
-rw-r--r--runtime/doc/lua.txt15
-rw-r--r--runtime/doc/options.txt2
-rw-r--r--runtime/lua/vim/_editor.lua2
-rw-r--r--runtime/lua/vim/keymap.lua2
6 files changed, 13 insertions, 12 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt
index 827d0318ab..be42b7c14e 100644
--- a/runtime/doc/api.txt
+++ b/runtime/doc/api.txt
@@ -348,7 +348,7 @@ callbacks. These callbacks are called frequently in various contexts;
|nvim_buf_attach()| will take keyword args for the callbacks. "on_lines" will
receive parameters ("lines", {buf}, {changedtick}, {firstline}, {lastline},
-{new_lastline}, {old_byte_size}[, {old_utf32_size}, {old_utf16_size}]).
+{new_lastline}, {old_byte_size} [, {old_utf32_size}, {old_utf16_size}]).
Unlike remote channel events the text contents are not passed. The new text can
be accessed inside the callback as
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 61d04c6660..f0f47cddf4 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -5311,7 +5311,7 @@ mode([expr]) Return a string that indicates the current mode.
niV Normal using |i_CTRL-O| in |Virtual-Replace-mode|
nt Normal in |terminal-emulator| (insert goes to
Terminal mode)
- ntT Normal using |t_CTRL-\_CTRL-O| in |terminal-mode|
+ ntT Normal using |t_CTRL-\_CTRL-O| in |Terminal-mode|
v Visual by character
vs Visual by character using |v_CTRL-O| in Select mode
V Visual by line
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index c9505429c6..4062a35735 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -704,7 +704,7 @@ regex:match_str({str}) *regex:match_str()*
As any integer is truth-y, `regex:match()` can be directly used
as a condition in an if-statement.
-regex:match_line({bufnr}, {line_idx}[, {start}, {end}]) *regex:match_line()*
+regex:match_line({bufnr}, {line_idx} [, {start}, {end}]) *regex:match_line()*
Match line {line_idx} (zero-based) in buffer {bufnr}. If {start} and
{end} are supplied, match only this byte index range. Otherwise see
|regex:match_str()|. If {start} is used, then the returned byte
@@ -855,13 +855,13 @@ vim.empty_dict() *vim.empty_dict()*
Note: If numeric keys are present in the table, Nvim ignores the
metatable marker and converts the dict to a list/array anyway.
-vim.rpcnotify({channel}, {method}[, {args}...]) *vim.rpcnotify()*
+vim.rpcnotify({channel}, {method} [, {args}...]) *vim.rpcnotify()*
Sends {event} to {channel} via |RPC| and returns immediately. If
{channel} is 0, the event is broadcast to all channels.
This function also works in a fast callback |lua-loop-callbacks|.
-vim.rpcrequest({channel}, {method}[, {args}...]) *vim.rpcrequest()*
+vim.rpcrequest({channel}, {method} [, {args}...]) *vim.rpcrequest()*
Sends a request to {channel} to invoke {method} via |RPC| and blocks
until a response is received.
@@ -873,7 +873,7 @@ vim.stricmp({a}, {b}) *vim.stricmp()*
are equal, {a} is greater than {b} or {a} is lesser than {b},
respectively.
-vim.str_utfindex({str}[, {index}]) *vim.str_utfindex()*
+vim.str_utfindex({str} [, {index}]) *vim.str_utfindex()*
Convert byte index to UTF-32 and UTF-16 indices. If {index} is not
supplied, the length of the string is used. All indices are zero-based.
Returns two values: the UTF-32 and UTF-16 indices respectively.
@@ -883,7 +883,7 @@ vim.str_utfindex({str}[, {index}]) *vim.str_utfindex()*
point each. An {index} in the middle of a UTF-8 sequence is rounded
upwards to the end of that sequence.
-vim.str_byteindex({str}, {index}[, {use_utf16}]) *vim.str_byteindex()*
+vim.str_byteindex({str}, {index} [, {use_utf16}]) *vim.str_byteindex()*
Convert UTF-32 or UTF-16 {index} to byte index. If {use_utf16} is not
supplied, it defaults to false (use UTF-32). Returns the byte index.
@@ -1315,7 +1315,7 @@ cmd({command}) *vim.cmd()*
vim.cmd('write! myfile.txt')
vim.cmd { cmd = 'write', args = { "myfile.txt" }, bang = true }
vim.cmd.write { args = { "myfile.txt" }, bang = true }
- vim.cmd.write {"myfile.txt", bang = true })
+ vim.cmd.write { "myfile.txt", bang = true }
-- Ex command :colorscheme blue
vim.cmd('colorscheme blue')
@@ -2229,7 +2229,8 @@ set({mode}, {lhs}, {rhs}, {opts}) *vim.keymap.set()*
• remap: (boolean) Make the mapping recursive.
This is the inverse of the "noremap" option from
|nvim_set_keymap()|. Default `false`.
- • replace_keycodes: (boolean) defaults to true.
+ • replace_keycodes: (boolean) defaults to true if
+ "expr" is true.
See also: ~
|nvim_set_keymap()|
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index ffeed6f977..9d03397821 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -4210,7 +4210,7 @@ A jump table for the options with a short description can be found at |Q_op|.
The 'mousemodel' option is set by the |:behave| command.
- *'mousescroll'*
+ *'mousescroll'*
'mousescroll' string (default "ver:3,hor:6")
global
This option controls the number of lines / columns to scroll by when
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua
index 094fb2f909..b8a7f71145 100644
--- a/runtime/lua/vim/_editor.lua
+++ b/runtime/lua/vim/_editor.lua
@@ -312,7 +312,7 @@ end
--- vim.cmd('write! myfile.txt')
--- vim.cmd { cmd = 'write', args = { "myfile.txt" }, bang = true }
--- vim.cmd.write { args = { "myfile.txt" }, bang = true }
---- vim.cmd.write {"myfile.txt", bang = true })
+--- vim.cmd.write { "myfile.txt", bang = true }
---
--- -- Ex command :colorscheme blue
--- vim.cmd('colorscheme blue')
diff --git a/runtime/lua/vim/keymap.lua b/runtime/lua/vim/keymap.lua
index 0549f63180..7265beb56b 100644
--- a/runtime/lua/vim/keymap.lua
+++ b/runtime/lua/vim/keymap.lua
@@ -43,7 +43,7 @@ local keymap = {}
--- - remap: (boolean) Make the mapping recursive. This is the
--- inverse of the "noremap" option from |nvim_set_keymap()|.
--- Default `false`.
---- - replace_keycodes: (boolean) defaults to true.
+--- - replace_keycodes: (boolean) defaults to true if "expr" is true.
---@see |nvim_set_keymap()|
function keymap.set(mode, lhs, rhs, opts)
vim.validate({