From 04c158fbec9aeeccd7bd1bb16fc8a688edadd353 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:54:45 +0200 Subject: [PATCH] docs: misc (#29622) Co-authored-by: Christian Clason Co-authored-by: zeertzjq --- INSTALL.md | 4 ++-- runtime/doc/builtin.txt | 2 +- runtime/doc/index.txt | 5 ++--- runtime/doc/various.txt | 2 +- runtime/lua/vim/_meta/vimfn.lua | 2 +- src/nvim/diff.c | 16 +--------------- src/nvim/edit.c | 1 - src/nvim/eval.lua | 2 +- src/nvim/getchar.c | 4 ++-- src/nvim/globals.h | 3 ++- src/nvim/highlight_group.c | 1 - src/nvim/indent_c.c | 2 -- src/nvim/main.c | 2 -- src/nvim/normal.c | 1 - 14 files changed, 13 insertions(+), 34 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 3e80e3e67e..af7580686b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -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). 2. Unzip the package. Any location is fine, administrator privileges are _not_ required. - `$VIMRUNTIME` will be set to that location automatically. -3. Double-click `nvim-qt.exe`. +3. Run `nvim.exe` from a terminal. **Optional** steps: - 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. 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 diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index de8bfc3aff..9c59dbf713 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -3583,7 +3583,7 @@ id({expr}) *id()* Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and `v:_null_blob` have the same `id()` with different types 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", {expr})`, but it is advised against counting on the exact format of the return value. diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 384b133d4e..9ee75ea950 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -401,7 +401,7 @@ tag char note action in Normal mode ~ |q| q{0-9a-zA-Z"} record typed characters into named register {0-9a-zA-Z"} (uppercase to append) |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 @@ -740,7 +740,7 @@ tag char note action in Normal mode ~ search pattern and Visually select it |gP| ["x]gP 2 put the text [from register x] before the cursor N times, leave the cursor after it -|gQ| gQ switch to "Ex" mode with Vim editing +|gQ| gQ switch to "Ex" mode with Vim editing |gR| gR 2 enter Virtual Replace mode |gT| gT go to the previous tab page |gU| gU{motion} 2 make Nmove text uppercase @@ -927,7 +927,6 @@ tag command note action in Visual mode ~ |v_O| O move horizontally to other corner of area |v_P| P replace highlighted area with register contents; registers are unchanged - Q does not start Ex mode |v_R| R 2 delete the highlighted lines and start insert |v_S| S 2 delete the highlighted lines and start diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index 9afb871d93..1acd6941fd 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -215,7 +215,7 @@ gx Opens the current filepath or URL (decided by This implies that an insert command must be completed (to start Insert mode, see |:startinsert|). A ":" 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. diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index b18ca1ecf8..750f16ef06 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -4316,7 +4316,7 @@ function vim.fn.iconv(string, from, to) end --- Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and --- `v:_null_blob` have the same `id()` with different types --- 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", --- {expr})`, but it is advised against counting on the exact --- format of the return value. diff --git a/src/nvim/diff.c b/src/nvim/diff.c index 0fe1729029..45bcb94a1f 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -213,9 +213,7 @@ void diff_buf_add(buf_T *buf) semsg(_("E96: Cannot diff more than %" PRId64 " buffers"), (int64_t)DB_COUNT); } -/// /// Remove all buffers to make diffs for. -/// static void diff_buf_clear(void) { 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; } - // // Check for these situations: // 1 2 3 // 1 2 3 @@ -835,7 +832,6 @@ static int diff_write(buf_T *buf, diffin_T *din) return r; } -/// /// Update the diffs for all buffers involved. /// /// @param dio @@ -909,20 +905,16 @@ theend: xfree(dio->dio_diff.dout_fname); } -/// /// 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 /// diff will be used anyway. -/// int diff_internal(void) FUNC_ATTR_PURE { return (diff_flags & DIFF_INTERNAL) != 0 && *p_dex == NUL; } -/// /// Return true if the internal diff failed for one of the diff buffers. -/// static int diff_internal_failed(void) { // 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 /// are no differences. Can't use the return value, it's non-zero when /// there are differences. -/// static int check_external_diff(diffio_T *diffio) { // May try twice, first with "-a" and then without. @@ -1091,9 +1081,7 @@ static int check_external_diff(diffio_T *diffio) return OK; } -/// /// Invoke the xdiff function. -/// static int diff_file_internal(diffio_T *diffio) { xpparam_t param; @@ -1813,9 +1801,7 @@ void diff_clear(tabpage_T *tp) 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) { if (!(diff_flags & DIFF_LINEMATCH)) { diff --git a/src/nvim/edit.c b/src/nvim/edit.c index f6e2dbfa4e..694a656323 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -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. #define ISSPECIAL(c) ((c) < ' ' || (c) >= DEL || (c) == '0' || (c) == '^') -/// /// "flags": INSCHAR_FORMAT - force formatting /// INSCHAR_CTRLV - char typed just after CTRL-V /// INSCHAR_NO_FEX - don't use 'formatexpr' diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index dfb1cab542..bbc78bc68e 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -5293,7 +5293,7 @@ M.funcs = { Note that `v:_null_string`, `v:_null_list`, `v:_null_dict` and `v:_null_blob` have the same `id()` with different types 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", {expr})`, but it is advised against counting on the exact format of the return value. diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 154a6a636a..a73824bdf5 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -1678,8 +1678,8 @@ int vgetc(void) vgetc_char = c; } - // a keypad or special function key was not mapped, use it like - // its ASCII equivalent + // A keypad or special function key was not mapped, use it like + // its ASCII equivalent. switch (c) { case K_KPLUS: c = '+'; break; diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 3e83911e86..f5b6b3d668 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -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. 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_char INIT( = 0); diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c index 3c777e7c4d..227df2fbdc 100644 --- a/src/nvim/highlight_group.c +++ b/src/nvim/highlight_group.c @@ -2273,7 +2273,6 @@ void highlight_changed(void) // sentinel value. used when no highlight namespace is active highlight_attr[HLF_COUNT] = 0; - // // Setup the user highlights // // Temporarily utilize 10 more hl entries: diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c index 65b5f46333..98b0d6003a 100644 --- a/src/nvim/indent_c.c +++ b/src/nvim/indent_c.c @@ -3419,9 +3419,7 @@ term_again: break; } - // // Skip preprocessor directives and blank lines. - // if (cin_ispreproc_cont(&l, &curwin->w_cursor.lnum, &amount)) { continue; } diff --git a/src/nvim/main.c b/src/nvim/main.c index 57909b14ef..72888757be 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -545,10 +545,8 @@ int main(int argc, char **argv) no_wait_return = true; - // // Create the requested number of windows and edit buffers in them. // Also does recovery if "recoverymode" set. - // create_windows(¶ms); TIME_MSG("opening buffers"); diff --git a/src/nvim/normal.c b/src/nvim/normal.c index cbd068401a..ee67748af9 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -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 '['. bn = ptr[col] == ']'; - // // 2. Back up to start of identifier/text. // // Remember class of character under cursor.