docs: fix typos (#19024)

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Valery Viktorovsky <viktorovsky@gmail.com>
This commit is contained in:
dundargoc
2022-07-31 10:46:38 +02:00
committed by GitHub
parent c1652bdcb5
commit abc087f4c6
9 changed files with 27 additions and 30 deletions

View File

@@ -1968,7 +1968,7 @@ nvim_buf_get_option({buffer}, {name}) *nvim_buf_get_option()*
Option value
nvim_buf_set_option({buffer}, {name}, {value}) *nvim_buf_set_option()*
Sets a buffer option value. Passing 'nil' as value deletes the
Sets a buffer option value. Passing `nil` as value deletes the
option (only works if there's a global fallback)
Parameters: ~
@@ -2075,7 +2075,7 @@ nvim_win_get_option({window}, {name}) *nvim_win_get_option()*
Option value
nvim_win_set_option({window}, {name}, {value}) *nvim_win_set_option()*
Sets a window option value. Passing 'nil' as value deletes the
Sets a window option value. Passing `nil` as value deletes the
option (only works if there's a global fallback)
Parameters: ~

View File

@@ -6674,7 +6674,6 @@ setbufline({buf}, {lnum}, {text}) *setbufline()*
|bufload()| if needed.
To insert lines use |appendbufline()|.
Any text properties in {lnum} are cleared.
{text} can be a string to set one line, or a list of strings
to set multiple lines. If the list extends below the last
@@ -8012,10 +8011,10 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
The result is a String, which is the {what} attribute of
syntax ID {synID}. This can be used to obtain information
about a syntax item.
{mode} can be "gui", "cterm" or "term", to get the attributes
{mode} can be "gui" or "cterm", to get the attributes
for that mode. When {mode} is omitted, or an invalid value is
used, the attributes for the currently active highlighting are
used (GUI, cterm or term).
used (GUI or cterm).
Use synIDtrans() to follow linked highlight groups.
{what} result
"name" the name of the syntax item
@@ -8043,12 +8042,12 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
"strikethrough" "1" if struckthrough
"nocombine" "1" if nocombine
Returns an empty string on error.
Example (echoes the color of the syntax item under the
cursor): >
:echo synIDattr(synIDtrans(synID(line("."), col("."), 1)), "fg")
<
Returns an empty string on error.
Can also be used as a |method|: >
:echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg")

View File

@@ -3571,7 +3571,7 @@ A jump table for the options with a short description can be found at |Q_op|.
help. (Note that previously setting the global option to the empty
value did this, which is now deprecated.)
When the first character is ":", the command is invoked as a Vim
Ex command with [count] added as an argument if it is not zero.
Ex command prefixed with [count].
When "man" or "man -s" is used, Vim will automatically translate
a [count] for the "K" command to a section number.
See |option-backslash| about including spaces and backslashes.
@@ -4210,14 +4210,14 @@ 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
scrolling with a mouse. The option is a comma separated list of parts.
Each part consists of a direction and a count as follows:
direction:count,direction:count
Direction is one of either "hor" or "ver", "hor" controls horizontal
Direction is one of either "hor" or "ver". "hor" controls horizontal
scrolling and "ver" controls vertical scrolling. Count sets the amount
to scroll by for the given direction, it should be a non negative
integer. Each direction should be set at most once. If a direction

View File

@@ -135,7 +135,6 @@ You could also write your own color scheme. This is how you do it:
2. Edit the color scheme file. These entries are useful:
term attributes in a B&W terminal
cterm attributes in a color terminal
ctermfg foreground color in a color terminal
ctermbg background color in a color terminal

View File

@@ -280,7 +280,7 @@ Object nvim_buf_get_option(Buffer buffer, String name, Error *err)
return get_option_from(buf, SREQ_BUF, name, err);
}
/// Sets a buffer option value. Passing 'nil' as value deletes the option (only
/// Sets a buffer option value. Passing `nil` as value deletes the option (only
/// works if there's a global fallback)
///
/// @param channel_id
@@ -318,7 +318,7 @@ Object nvim_win_get_option(Window window, String name, Error *err)
return get_option_from(win, SREQ_WIN, name, err);
}
/// Sets a window option value. Passing 'nil' as value deletes the option(only
/// Sets a window option value. Passing `nil` as value deletes the option (only
/// works if there's a global fallback)
///
/// @param channel_id

View File

@@ -5270,7 +5270,6 @@ void forward_slash(char_u *fname)
return;
}
for (p = fname; *p != NUL; p++) {
// The Big5 encoding can have '\' in the trail byte.
if (*p == '\\') {
*p = '/';
}

View File

@@ -1686,7 +1686,7 @@ int nlua_expand_pat(expand_T *xp, char_u *pat, int *num_results, char_u ***resul
lua_getfield(lstate, -1, "_expand_pat");
luaL_checktype(lstate, -1, LUA_TFUNCTION);
// [ vim, vim._on_key, buf ]
// [ vim, vim._expand_pat, buf ]
lua_pushlstring(lstate, (const char *)pat, STRLEN(pat));
if (nlua_pcall(lstate, 1, 2) != 0) {