docs: misc (#29622)

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
dundargoc 2024-07-15 00:54:45 +02:00 committed by GitHub
parent da9e938793
commit 04c158fbec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 13 additions and 34 deletions

View File

@ -55,12 +55,12 @@ Several Neovim GUIs are available from scoop (extras): [scoop.sh/#/apps?q=neovim
1. Choose a package (**nvim-winXX.zip**) from the [releases page](https://github.com/neovim/neovim/releases). 1. Choose a package (**nvim-winXX.zip**) from the [releases page](https://github.com/neovim/neovim/releases).
2. Unzip the package. Any location is fine, administrator privileges are _not_ required. 2. Unzip the package. Any location is fine, administrator privileges are _not_ required.
- `$VIMRUNTIME` will be set to that location automatically. - `$VIMRUNTIME` will be set to that location automatically.
3. Double-click `nvim-qt.exe`. 3. Run `nvim.exe` from a terminal.
**Optional** steps: **Optional** steps:
- Add the `bin` folder (e.g. `C:\Program Files\nvim\bin`) to your PATH. - Add the `bin` folder (e.g. `C:\Program Files\nvim\bin`) to your PATH.
- This makes it easy to run `nvim` and `nvim-qt` from anywhere. - This makes it easy to run `nvim` from anywhere.
- If `:set spell` does not work, create the `C:/Users/foo/AppData/Local/nvim/site/spell` folder. - If `:set spell` does not work, create the `C:/Users/foo/AppData/Local/nvim/site/spell` folder.
You can then copy your spell files over (for English, located You can then copy your spell files over (for English, located
[here](https://github.com/vim/vim/blob/master/runtime/spell/en.utf-8.spl) and [here](https://github.com/vim/vim/blob/master/runtime/spell/en.utf-8.spl) and

View File

@ -3583,7 +3583,7 @@ id({expr}) *id()*
Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and
`v:_null_blob` have the same `id()` with different types `v:_null_blob` have the same `id()` with different types
because they are internally represented as NULL pointers. because they are internally represented as NULL pointers.
`id()` returns a hexadecimal representanion of the pointers to `id()` returns a hexadecimal representation of the pointers to
the containers (i.e. like `0x994a40`), same as `printf("%p", the containers (i.e. like `0x994a40`), same as `printf("%p",
{expr})`, but it is advised against counting on the exact {expr})`, but it is advised against counting on the exact
format of the return value. format of the return value.

View File

@ -401,7 +401,7 @@ tag char note action in Normal mode ~
|q| q{0-9a-zA-Z"} record typed characters into named register |q| q{0-9a-zA-Z"} record typed characters into named register
{0-9a-zA-Z"} (uppercase to append) {0-9a-zA-Z"} (uppercase to append)
|q| q (while recording) stops recording |q| q (while recording) stops recording
|Q| Q replay last recorded macro |Q| Q 2 replay last recorded register
|q:| q: edit : command-line in command-line window |q:| q: edit : command-line in command-line window
|q/| q/ edit / command-line in command-line window |q/| q/ edit / command-line in command-line window
|q?| q? edit ? command-line in command-line window |q?| q? edit ? command-line in command-line window
@ -927,7 +927,6 @@ tag command note action in Visual mode ~
|v_O| O move horizontally to other corner of area |v_O| O move horizontally to other corner of area
|v_P| P replace highlighted area with register |v_P| P replace highlighted area with register
contents; registers are unchanged contents; registers are unchanged
Q does not start Ex mode
|v_R| R 2 delete the highlighted lines and start |v_R| R 2 delete the highlighted lines and start
insert insert
|v_S| S 2 delete the highlighted lines and start |v_S| S 2 delete the highlighted lines and start

View File

@ -215,7 +215,7 @@ gx Opens the current filepath or URL (decided by
This implies that an insert command must be completed This implies that an insert command must be completed
(to start Insert mode, see |:startinsert|). A ":" (to start Insert mode, see |:startinsert|). A ":"
command must be completed as well. And you can't use command must be completed as well. And you can't use
"Q" or "gQ" to start Ex mode. "gQ" to start Ex mode.
The display is not updated while ":normal" is busy. The display is not updated while ":normal" is busy.

View File

@ -4316,7 +4316,7 @@ function vim.fn.iconv(string, from, to) end
--- Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and --- Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and
--- `v:_null_blob` have the same `id()` with different types --- `v:_null_blob` have the same `id()` with different types
--- because they are internally represented as NULL pointers. --- because they are internally represented as NULL pointers.
--- `id()` returns a hexadecimal representanion of the pointers to --- `id()` returns a hexadecimal representation of the pointers to
--- the containers (i.e. like `0x994a40`), same as `printf("%p", --- the containers (i.e. like `0x994a40`), same as `printf("%p",
--- {expr})`, but it is advised against counting on the exact --- {expr})`, but it is advised against counting on the exact
--- format of the return value. --- format of the return value.

View File

@ -213,9 +213,7 @@ void diff_buf_add(buf_T *buf)
semsg(_("E96: Cannot diff more than %" PRId64 " buffers"), (int64_t)DB_COUNT); semsg(_("E96: Cannot diff more than %" PRId64 " buffers"), (int64_t)DB_COUNT);
} }
///
/// Remove all buffers to make diffs for. /// Remove all buffers to make diffs for.
///
static void diff_buf_clear(void) static void diff_buf_clear(void)
{ {
for (int i = 0; i < DB_COUNT; i++) { for (int i = 0; i < DB_COUNT; i++) {
@ -367,7 +365,6 @@ static void diff_mark_adjust_tp(tabpage_T *tp, int idx, linenr_T line1, linenr_T
break; break;
} }
//
// Check for these situations: // Check for these situations:
// 1 2 3 // 1 2 3
// 1 2 3 // 1 2 3
@ -835,7 +832,6 @@ static int diff_write(buf_T *buf, diffin_T *din)
return r; return r;
} }
///
/// Update the diffs for all buffers involved. /// Update the diffs for all buffers involved.
/// ///
/// @param dio /// @param dio
@ -909,20 +905,16 @@ theend:
xfree(dio->dio_diff.dout_fname); xfree(dio->dio_diff.dout_fname);
} }
///
/// Return true if the options are set to use the internal diff library. /// Return true if the options are set to use the internal diff library.
/// Note that if the internal diff failed for one of the buffers, the external /// Note that if the internal diff failed for one of the buffers, the external
/// diff will be used anyway. /// diff will be used anyway.
///
int diff_internal(void) int diff_internal(void)
FUNC_ATTR_PURE FUNC_ATTR_PURE
{ {
return (diff_flags & DIFF_INTERNAL) != 0 && *p_dex == NUL; return (diff_flags & DIFF_INTERNAL) != 0 && *p_dex == NUL;
} }
///
/// Return true if the internal diff failed for one of the diff buffers. /// Return true if the internal diff failed for one of the diff buffers.
///
static int diff_internal_failed(void) static int diff_internal_failed(void)
{ {
// Only need to do something when there is another buffer. // Only need to do something when there is another buffer.
@ -1003,11 +995,9 @@ theend:
} }
} }
///
/// Do a quick test if "diff" really works. Otherwise it looks like there /// Do a quick test if "diff" really works. Otherwise it looks like there
/// are no differences. Can't use the return value, it's non-zero when /// are no differences. Can't use the return value, it's non-zero when
/// there are differences. /// there are differences.
///
static int check_external_diff(diffio_T *diffio) static int check_external_diff(diffio_T *diffio)
{ {
// May try twice, first with "-a" and then without. // May try twice, first with "-a" and then without.
@ -1091,9 +1081,7 @@ static int check_external_diff(diffio_T *diffio)
return OK; return OK;
} }
///
/// Invoke the xdiff function. /// Invoke the xdiff function.
///
static int diff_file_internal(diffio_T *diffio) static int diff_file_internal(diffio_T *diffio)
{ {
xpparam_t param; xpparam_t param;
@ -1813,9 +1801,7 @@ void diff_clear(tabpage_T *tp)
tp->tp_first_diff = NULL; tp->tp_first_diff = NULL;
} }
/// /// Return true if the options are set to use diff linematch.
/// return true if the options are set to use diff linematch
///
bool diff_linematch(diff_T *dp) bool diff_linematch(diff_T *dp)
{ {
if (!(diff_flags & DIFF_LINEMATCH)) { if (!(diff_flags & DIFF_LINEMATCH)) {

View File

@ -2027,7 +2027,6 @@ static void insert_special(int c, int allow_modmask, int ctrlv)
// '0' and '^' are special, because they can be followed by CTRL-D. // '0' and '^' are special, because they can be followed by CTRL-D.
#define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^') #define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^')
///
/// "flags": INSCHAR_FORMAT - force formatting /// "flags": INSCHAR_FORMAT - force formatting
/// INSCHAR_CTRLV - char typed just after CTRL-V /// INSCHAR_CTRLV - char typed just after CTRL-V
/// INSCHAR_NO_FEX - don't use 'formatexpr' /// INSCHAR_NO_FEX - don't use 'formatexpr'

View File

@ -5293,7 +5293,7 @@ M.funcs = {
Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and
`v:_null_blob` have the same `id()` with different types `v:_null_blob` have the same `id()` with different types
because they are internally represented as NULL pointers. because they are internally represented as NULL pointers.
`id()` returns a hexadecimal representanion of the pointers to `id()` returns a hexadecimal representation of the pointers to
the containers (i.e. like `0x994a40`), same as `printf("%p", the containers (i.e. like `0x994a40`), same as `printf("%p",
{expr})`, but it is advised against counting on the exact {expr})`, but it is advised against counting on the exact
format of the return value. format of the return value.

View File

@ -1678,8 +1678,8 @@ int vgetc(void)
vgetc_char = c; vgetc_char = c;
} }
// a keypad or special function key was not mapped, use it like // A keypad or special function key was not mapped, use it like
// its ASCII equivalent // its ASCII equivalent.
switch (c) { switch (c) {
case K_KPLUS: case K_KPLUS:
c = '+'; break; c = '+'; break;

View File

@ -106,7 +106,8 @@ EXTERN int Columns INIT( = DFLT_COLS); // nr of columns in the screen
// held down based on the MOD_MASK_* symbols that are read first. // held down based on the MOD_MASK_* symbols that are read first.
EXTERN int mod_mask INIT( = 0); // current key modifiers EXTERN int mod_mask INIT( = 0); // current key modifiers
// The value of "mod_mask" and the unmodified character before calling merge_modifiers(). // The value of "mod_mask" and the unmodified character in vgetc() after it has
// called vgetorpeek() enough times.
EXTERN int vgetc_mod_mask INIT( = 0); EXTERN int vgetc_mod_mask INIT( = 0);
EXTERN int vgetc_char INIT( = 0); EXTERN int vgetc_char INIT( = 0);

View File

@ -2273,7 +2273,6 @@ void highlight_changed(void)
// sentinel value. used when no highlight namespace is active // sentinel value. used when no highlight namespace is active
highlight_attr[HLF_COUNT] = 0; highlight_attr[HLF_COUNT] = 0;
//
// Setup the user highlights // Setup the user highlights
// //
// Temporarily utilize 10 more hl entries: // Temporarily utilize 10 more hl entries:

View File

@ -3419,9 +3419,7 @@ term_again:
break; break;
} }
//
// Skip preprocessor directives and blank lines. // Skip preprocessor directives and blank lines.
//
if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount)) { if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount)) {
continue; continue;
} }

View File

@ -545,10 +545,8 @@ int main(int argc, char **argv)
no_wait_return = true; no_wait_return = true;
//
// Create the requested number of windows and edit buffers in them. // Create the requested number of windows and edit buffers in them.
// Also does recovery if "recoverymode" set. // Also does recovery if "recoverymode" set.
//
create_windows(&params); create_windows(&params);
TIME_MSG("opening buffers"); TIME_MSG("opening buffers");

View File

@ -1660,7 +1660,6 @@ size_t find_ident_at_pos(win_T *wp, linenr_T lnum, colnr_T startcol, char **text
// When starting on a ']' count it, so that we include the '['. // When starting on a ']' count it, so that we include the '['.
bn = ptr[col] == ']'; bn = ptr[col] == ']';
//
// 2. Back up to start of identifier/text. // 2. Back up to start of identifier/text.
// //
// Remember class of character under cursor. // Remember class of character under cursor.