mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
docs: fix typos (#19024)
Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Valery Viktorovsky <viktorovsky@gmail.com>
This commit is contained in:
@@ -1968,7 +1968,7 @@ nvim_buf_get_option({buffer}, {name}) *nvim_buf_get_option()*
|
|||||||
Option value
|
Option value
|
||||||
|
|
||||||
nvim_buf_set_option({buffer}, {name}, {value}) *nvim_buf_set_option()*
|
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)
|
option (only works if there's a global fallback)
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
@@ -2075,7 +2075,7 @@ nvim_win_get_option({window}, {name}) *nvim_win_get_option()*
|
|||||||
Option value
|
Option value
|
||||||
|
|
||||||
nvim_win_set_option({window}, {name}, {value}) *nvim_win_set_option()*
|
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)
|
option (only works if there's a global fallback)
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
|
@@ -6674,7 +6674,6 @@ setbufline({buf}, {lnum}, {text}) *setbufline()*
|
|||||||
|bufload()| if needed.
|
|bufload()| if needed.
|
||||||
|
|
||||||
To insert lines use |appendbufline()|.
|
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
|
{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
|
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
|
The result is a String, which is the {what} attribute of
|
||||||
syntax ID {synID}. This can be used to obtain information
|
syntax ID {synID}. This can be used to obtain information
|
||||||
about a syntax item.
|
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
|
for that mode. When {mode} is omitted, or an invalid value is
|
||||||
used, the attributes for the currently active highlighting are
|
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.
|
Use synIDtrans() to follow linked highlight groups.
|
||||||
{what} result
|
{what} result
|
||||||
"name" the name of the syntax item
|
"name" the name of the syntax item
|
||||||
@@ -8043,12 +8042,12 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
|
|||||||
"strikethrough" "1" if struckthrough
|
"strikethrough" "1" if struckthrough
|
||||||
"nocombine" "1" if nocombine
|
"nocombine" "1" if nocombine
|
||||||
|
|
||||||
|
Returns an empty string on error.
|
||||||
|
|
||||||
Example (echoes the color of the syntax item under the
|
Example (echoes the color of the syntax item under the
|
||||||
cursor): >
|
cursor): >
|
||||||
:echo synIDattr(synIDtrans(synID(line("."), col("."), 1)), "fg")
|
:echo synIDattr(synIDtrans(synID(line("."), col("."), 1)), "fg")
|
||||||
<
|
<
|
||||||
Returns an empty string on error.
|
|
||||||
|
|
||||||
Can also be used as a |method|: >
|
Can also be used as a |method|: >
|
||||||
:echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg")
|
:echo synID(line("."), col("."), 1)->synIDtrans()->synIDattr("fg")
|
||||||
|
|
||||||
|
@@ -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
|
help. (Note that previously setting the global option to the empty
|
||||||
value did this, which is now deprecated.)
|
value did this, which is now deprecated.)
|
||||||
When the first character is ":", the command is invoked as a Vim
|
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
|
When "man" or "man -s" is used, Vim will automatically translate
|
||||||
a [count] for the "K" command to a section number.
|
a [count] for the "K" command to a section number.
|
||||||
See |option-backslash| about including spaces and backslashes.
|
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.
|
The 'mousemodel' option is set by the |:behave| command.
|
||||||
|
|
||||||
*mousescroll*
|
*'mousescroll'*
|
||||||
'mousescroll' string (default "ver:3,hor:6")
|
'mousescroll' string (default "ver:3,hor:6")
|
||||||
global
|
global
|
||||||
This option controls the number of lines / columns to scroll by when
|
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.
|
scrolling with a mouse. The option is a comma separated list of parts.
|
||||||
Each part consists of a direction and a count as follows:
|
Each part consists of a direction and a count as follows:
|
||||||
direction:count,direction:count
|
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
|
scrolling and "ver" controls vertical scrolling. Count sets the amount
|
||||||
to scroll by for the given direction, it should be a non negative
|
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
|
integer. Each direction should be set at most once. If a direction
|
||||||
|
@@ -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:
|
2. Edit the color scheme file. These entries are useful:
|
||||||
|
|
||||||
term attributes in a B&W terminal
|
|
||||||
cterm attributes in a color terminal
|
cterm attributes in a color terminal
|
||||||
ctermfg foreground color in a color terminal
|
ctermfg foreground color in a color terminal
|
||||||
ctermbg background color in a color terminal
|
ctermbg background color in a color terminal
|
||||||
|
@@ -280,7 +280,7 @@ Object nvim_buf_get_option(Buffer buffer, String name, Error *err)
|
|||||||
return get_option_from(buf, SREQ_BUF, name, 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)
|
/// works if there's a global fallback)
|
||||||
///
|
///
|
||||||
/// @param channel_id
|
/// @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);
|
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)
|
/// works if there's a global fallback)
|
||||||
///
|
///
|
||||||
/// @param channel_id
|
/// @param channel_id
|
||||||
|
@@ -5270,7 +5270,6 @@ void forward_slash(char_u *fname)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (p = fname; *p != NUL; p++) {
|
for (p = fname; *p != NUL; p++) {
|
||||||
// The Big5 encoding can have '\' in the trail byte.
|
|
||||||
if (*p == '\\') {
|
if (*p == '\\') {
|
||||||
*p = '/';
|
*p = '/';
|
||||||
}
|
}
|
||||||
|
@@ -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");
|
lua_getfield(lstate, -1, "_expand_pat");
|
||||||
luaL_checktype(lstate, -1, LUA_TFUNCTION);
|
luaL_checktype(lstate, -1, LUA_TFUNCTION);
|
||||||
|
|
||||||
// [ vim, vim._on_key, buf ]
|
// [ vim, vim._expand_pat, buf ]
|
||||||
lua_pushlstring(lstate, (const char *)pat, STRLEN(pat));
|
lua_pushlstring(lstate, (const char *)pat, STRLEN(pat));
|
||||||
|
|
||||||
if (nlua_pcall(lstate, 1, 2) != 0) {
|
if (nlua_pcall(lstate, 1, 2) != 0) {
|
||||||
|
Reference in New Issue
Block a user