From e63e5d1dbd3dd4711efa0ecf9e844ff308b370a6 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Fri, 15 Apr 2022 12:35:06 +0200 Subject: [PATCH] docs: typo fixes (#17859) Co-authored-by: Elias Alves Moura Co-authored-by: venkatesh Co-authored-by: zeertzjq Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com> Co-authored-by: Steve Vermeulen Co-authored-by: Evgeni Chasnovski Co-authored-by: rwxd Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com> --- CONTRIBUTING.md | 4 ++-- MAINTAIN.md | 2 +- runtime/doc/api.txt | 9 ++++----- runtime/doc/builtin.txt | 2 -- runtime/doc/lua.txt | 4 ++-- runtime/doc/options.txt | 2 +- runtime/doc/term.txt | 2 +- runtime/doc/treesitter.txt | 2 +- runtime/lua/vim/ui.lua | 2 +- scripts/lua2dox.lua | 2 +- src/nvim/README.md | 2 +- src/nvim/api/autocmd.c | 6 +++--- src/nvim/api/window.c | 3 +-- src/nvim/ex_getln.c | 2 +- src/nvim/highlight_group.c | 2 +- src/nvim/memline.c | 6 ++---- src/nvim/normal.c | 2 +- src/nvim/screen.c | 2 +- src/nvim/screen.h | 2 +- src/nvim/testdir/test_breakindent.vim | 2 +- src/nvim/testdir/test_cmdline.vim | 2 +- src/nvim/testdir/test_debugger.vim | 2 +- src/nvim/testdir/test_increment.vim | 2 +- src/nvim/testdir/test_quickfix.vim | 2 +- src/nvim/testdir/test_regexp_latin.vim | 2 +- src/nvim/testdir/test_sort.vim | 2 +- test/functional/api/extmark_spec.lua | 2 +- test/functional/api/highlight_spec.lua | 2 +- test/functional/core/job_spec.lua | 2 +- test/functional/core/startup_spec.lua | 2 +- test/functional/ex_cmds/cd_spec.lua | 2 +- test/functional/terminal/highlight_spec.lua | 2 +- test/functional/ui/decorations_spec.lua | 2 +- test/functional/ui/messages_spec.lua | 4 ++-- test/functional/ui/multibyte_spec.lua | 2 +- test/functional/ui/popupmenu_spec.lua | 4 ++-- test/functional/ui/screen.lua | 2 +- test/functional/ui/searchhl_spec.lua | 2 +- test/functional/vimscript/system_spec.lua | 2 +- 39 files changed, 48 insertions(+), 54 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5e04f33b15..078377dcc2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ low-risk/isolated tasks: - Fix bugs found by [Clang](#clang-scan-build), [PVS](#pvs-studio) or [Coverity](#coverity). - [Improve documentation][wiki-contribute-help] -- [Merge a Vim patch] (Familiarity with Vim is *strongly* recommended) +- [Merge a Vim patch] (familiarity with Vim is *strongly* recommended) Reporting problems ------------------ @@ -289,7 +289,7 @@ as context, use the `-W` argument as well. [complexity:low]: https://github.com/neovim/neovim/issues?q=is%3Aopen+is%3Aissue+label%3Acomplexity%3Alow [master error list]: https://raw.githubusercontent.com/neovim/doc/gh-pages/reports/clint/errors.json [wiki-contribute-help]: https://github.com/neovim/neovim/wiki/contribute-%3Ahelp -[pr-draft]: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request +[pr-draft]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request [pr-ready]: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request [uncrustify]: http://uncrustify.sourceforge.net/ [lua-language-server]: https://github.com/sumneko/lua-language-server/ diff --git a/MAINTAIN.md b/MAINTAIN.md index 2b390270a9..927ddea5a1 100644 --- a/MAINTAIN.md +++ b/MAINTAIN.md @@ -52,7 +52,7 @@ has a major bug: 3. Cut a release from `release-x.y`. - Run `./scripts/release.sh` - Update (force-push) the remote `stable` tag. - - The [nightly job](https://github.com/neovim/bot-ci/blob/master/ci/nightly.sh) + - The [nightly job](https://github.com/neovim/neovim/blob/master/.github/workflows/release.yml#L4) will update the release assets based on the `stable` tag. The neovim repository includes a backport [github action](https://github.com/zeebe-io/backport-action). diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 858258320d..9e0002db48 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -2859,8 +2859,7 @@ nvim_win_set_cursor({window}, {pos}) *nvim_win_set_cursor()* {pos} (row, col) tuple representing the new position nvim_win_set_height({window}, {height}) *nvim_win_set_height()* - Sets the window height. This will only succeed if the screen - is split horizontally. + Sets the window height. Parameters: ~ {window} Window handle, or 0 for current window @@ -3234,9 +3233,9 @@ nvim_create_autocmd({event}, {*opts}) *nvim_create_autocmd()* pattern = { "*.py", "*.pyi" } < - Examples values for event: > - "BufPreWrite" - {"CursorHold", "BufPreWrite", "BufPostWrite"} + Example values for event: > + "BufWritePre" + {"CursorHold", "BufWritePre", "BufWritePost"} < Parameters: ~ diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt index 49aa52a92f..7871885a5d 100644 --- a/runtime/doc/builtin.txt +++ b/runtime/doc/builtin.txt @@ -966,8 +966,6 @@ byteidxcomp({expr}, {nr}) *byteidxcomp()* < The first and third echo result in 3 ('e' plus composing character is 3 bytes), the second echo results in 1 ('e' is one byte). - Only works differently from byteidx() when 'encoding' is set - to a Unicode encoding. Can also be used as a |method|: > GetName()->byteidxcomp(idx) diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 46b9f0576f..16f27486c8 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1151,7 +1151,7 @@ In any of the above examples, to replicate the behavior |setlocal|, use |vim.opt| returns an Option object. -For example: `local listchar_object = vim.opt.listchar` +For example: `local listchar_object = vim.opt.listchars` An `Option` has the following methods: @@ -1910,7 +1910,7 @@ select({items}, {opts}, {on_choice}) *vim.ui.select()* which select() was called. {on_choice} function ((item|nil, idx|nil) -> ()) Called once the user made a choice. `idx` is the - 1-based index of `item` within `item`. `nil` + 1-based index of `item` within `items`. `nil` if the user aborted the dialog. diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 8d353804a4..7ea6a92a34 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -921,7 +921,7 @@ A jump table for the options with a short description can be found at |Q_op|. Note that environment variables are not expanded. If you want to use $HOME you must expand it explicitly, e.g.: > - :let backupskip = escape(expand('$HOME'), '\') .. '/tmp/*' + :let &backupskip = escape(expand('$HOME'), '\') .. '/tmp/*' < Note that the default also makes sure that "crontab -e" works (when a backup would be made by renaming the original file crontab won't see diff --git a/runtime/doc/term.txt b/runtime/doc/term.txt index ddf52b65c6..bdf0094721 100644 --- a/runtime/doc/term.txt +++ b/runtime/doc/term.txt @@ -111,7 +111,7 @@ width of the terminal. *tui-input* Nvim uses libtermkey to convert terminal escape sequences to key codes. |terminfo| is used first, and CSI sequences not in |terminfo| (including -exteneded keys a.k.a. modifyOtherKeys or `CSI u`) can also be parsed. +extended keys a.k.a. modifyOtherKeys or `CSI u`) can also be parsed. For example, when running Nvim in tmux, this makes Nvim leave Insert mode and go to the window below: > tmux send-keys 'Escape' [ 2 7 u 'C-W' j diff --git a/runtime/doc/treesitter.txt b/runtime/doc/treesitter.txt index a9d9f81849..b10bf3498d 100644 --- a/runtime/doc/treesitter.txt +++ b/runtime/doc/treesitter.txt @@ -268,7 +268,7 @@ Here is a list of built-in directives: ((identifier) @foo (#set! @foo "kind" "parameter")) ((node1) @left (node2) @right (#set! "type" "pair")) < - `offset!` *ts-predicate-offset!* + `offset!` *ts-directive-offset!* Takes the range of the captured node and applies the offsets to it's range : > ((identifier) @constant (#offset! @constant 0 1 0 -1)) diff --git a/runtime/lua/vim/ui.lua b/runtime/lua/vim/ui.lua index 9d4b38f08a..165dada1b8 100644 --- a/runtime/lua/vim/ui.lua +++ b/runtime/lua/vim/ui.lua @@ -16,7 +16,7 @@ local M = {} --- `items`, or the context in which select() was called. ---@param on_choice function ((item|nil, idx|nil) -> ()) --- Called once the user made a choice. ---- `idx` is the 1-based index of `item` within `item`. +--- `idx` is the 1-based index of `item` within `items`. --- `nil` if the user aborted the dialog. --- --- diff --git a/scripts/lua2dox.lua b/scripts/lua2dox.lua index d110e34c6a..c32370517c 100644 --- a/scripts/lua2dox.lua +++ b/scripts/lua2dox.lua @@ -295,7 +295,7 @@ function TStream_Write.writelnTail(this,Line) table.insert(this.tailLine,Line) end ---! \brief outout tail lines +--! \brief output tail lines function TStream_Write.write_tailLines(this) for _,line in ipairs(this.tailLine) do TCore_IO_writeln(line) diff --git a/src/nvim/README.md b/src/nvim/README.md index 4efb42b896..c7cb233c73 100644 --- a/src/nvim/README.md +++ b/src/nvim/README.md @@ -68,7 +68,7 @@ Configure the sanitizer(s) via these environment variables: export ASAN_OPTIONS="detect_leaks=0:log_path=$HOME/logs/asan" # Show backtraces in the logs. export UBSAN_OPTIONS=print_stacktrace=1 - export MSAN_OPTIONS="log_path=${HOME}/logs/tsan" + export MSAN_OPTIONS="log_path=${HOME}/logs/msan" export TSAN_OPTIONS="log_path=${HOME}/logs/tsan" Logs will be written to `${HOME}/logs/*san.PID` then. diff --git a/src/nvim/api/autocmd.c b/src/nvim/api/autocmd.c index ccf4ae3d02..a012f3d7fc 100644 --- a/src/nvim/api/autocmd.c +++ b/src/nvim/api/autocmd.c @@ -360,10 +360,10 @@ cleanup: /// pattern = { "*.py", "*.pyi" } /// /// -/// Examples values for event: +/// Example values for event: ///
-///   "BufPreWrite"
-///   {"CursorHold", "BufPreWrite", "BufPostWrite"}
+///   "BufWritePre"
+///   {"CursorHold", "BufWritePre", "BufWritePost"}
 /// 
/// /// @param event (string|array) The event or events to register this autocommand diff --git a/src/nvim/api/window.c b/src/nvim/api/window.c index fd33a82be3..3a3a65f812 100644 --- a/src/nvim/api/window.c +++ b/src/nvim/api/window.c @@ -139,8 +139,7 @@ Integer nvim_win_get_height(Window window, Error *err) return win->w_height; } -/// Sets the window height. This will only succeed if the screen is split -/// horizontally. +/// Sets the window height. /// /// @param window Window handle, or 0 for current window /// @param height Height as a count of rows diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index a7c0b06050..49bd8e7b21 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -5852,7 +5852,7 @@ HistoryType get_histtype(const char *const name, const size_t len, const bool re static int last_maptick = -1; // last seen maptick /// Add the given string to the given history. If the string is already in the -/// history then it is moved to the front. "histype" may be one of he HIST_ +/// history then it is moved to the front. "histype" may be one of the HIST_ /// values. /// /// @parma in_map consider maptick when inside a mapping diff --git a/src/nvim/highlight_group.c b/src/nvim/highlight_group.c index d448f3a646..3092aaefab 100644 --- a/src/nvim/highlight_group.c +++ b/src/nvim/highlight_group.c @@ -446,7 +446,7 @@ const char *const highlight_init_cmdline[] = { "default link NvimInvalidSpacing ErrorMsg", - // Not actually invalid, but we highlight user that he is doing something + // Not actually invalid, but we show the user that they are doing something // wrong. "default link NvimDoubleQuotedUnknownEscape NvimInvalidValue", NULL, diff --git a/src/nvim/memline.c b/src/nvim/memline.c index 5f6e1ea273..55480ab384 100644 --- a/src/nvim/memline.c +++ b/src/nvim/memline.c @@ -3944,10 +3944,8 @@ static void ml_updatechunk(buf_T *buf, linenr_T line, long len, int updtype) } else if (buf->b_ml.ml_chunksize[curix].mlcs_numlines >= MLCS_MINL && curix == buf->b_ml.ml_usedchunks - 1 && buf->b_ml.ml_line_count - line <= 1) { - /* - * We are in the last chunk and it is cheap to crate a new one - * after this. Do it now to avoid the loop above later on - */ + // We are in the last chunk and it is cheap to create a new one + // after this. Do it now to avoid the loop above later on curchnk = buf->b_ml.ml_chunksize + curix + 1; buf->b_ml.ml_usedchunks++; if (line == buf->b_ml.ml_line_count) { diff --git a/src/nvim/normal.c b/src/nvim/normal.c index a8769c4c80..d6b3b53c86 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -4533,7 +4533,7 @@ static void nv_scroll(cmdarg_T *cap) validate_botline(curwin); // make sure w_empty_rows is valid half = (curwin->w_height_inner - curwin->w_empty_rows + 1) / 2; for (n = 0; curwin->w_topline + n < curbuf->b_ml.ml_line_count; n++) { - // Count half he number of filler lines to be "below this + // Count half the number of filler lines to be "below this // line" and half to be "above the next line". if (n > 0 && used + win_get_fill(curwin, curwin->w_topline + n) / 2 >= half) { n--; diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 5a33ebfb37..c6fd9e5dff 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -4840,7 +4840,7 @@ static int get_corner_sep_connector(win_T *wp, WindowCorner corner) } } -/// Draw seperator connecting characters on the corners of window "wp" +/// Draw separator connecting characters on the corners of window "wp" static void draw_sep_connectors_win(win_T *wp) { // Don't draw separator connectors unless global statusline is enabled and the window has diff --git a/src/nvim/screen.h b/src/nvim/screen.h index 5e86dacd25..330ff1d4a1 100644 --- a/src/nvim/screen.h +++ b/src/nvim/screen.h @@ -27,7 +27,7 @@ typedef enum { WC_BOTTOM_RIGHT } WindowCorner; -/// By default, all widows are draw on a single rectangular grid, represented by +/// By default, all windows are drawn on a single rectangular grid, represented by /// this ScreenGrid instance. In multigrid mode each window will have its own /// grid, then this is only used for global screen elements that hasn't been /// externalized. diff --git a/src/nvim/testdir/test_breakindent.vim b/src/nvim/testdir/test_breakindent.vim index 438edb0257..a37751e748 100644 --- a/src/nvim/testdir/test_breakindent.vim +++ b/src/nvim/testdir/test_breakindent.vim @@ -770,7 +770,7 @@ func Test_breakindent20_list() \ "shall make no law ", \ ] call s:compare_lines(expect, lines) - " set mininum indent + " set minimum indent setl briopt=min:5 redraw! let lines = s:screen_lines2(1, 6, 20) diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index c589d941da..5c2f6f8d0b 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -1127,7 +1127,7 @@ func Test_cmdwin_tabpage() tabedit " v8.2.1919 isn't ported yet, so E492 is thrown after E11 here. " v8.2.1183 also isn't ported yet, so we also can't assert E11 directly. - " For now, assert E11 and E492 seperately. When v8.2.1183 is ported, the + " For now, assert E11 and E492 separately. When v8.2.1183 is ported, the " assert for E492 will fail and this workaround should be removed. " call assert_fails("silent norm q/g :I\", 'E11:') call assert_fails("silent norm q/g ", 'E11:') diff --git a/src/nvim/testdir/test_debugger.vim b/src/nvim/testdir/test_debugger.vim index a396efc09e..e038c0096a 100644 --- a/src/nvim/testdir/test_debugger.vim +++ b/src/nvim/testdir/test_debugger.vim @@ -976,7 +976,7 @@ func Test_debug_backtrace_level() \ 'line 1: let s:file1_var = ''file1''' \ ]) - " step throught the initial declarations + " step through the initial declarations call RunDbgCmd(buf, 'step', [ 'line 2: let g:global_var = ''global''' ] ) call RunDbgCmd(buf, 'step', [ 'line 4: func s:File1Func( arg )' ] ) call RunDbgCmd(buf, 'echo s:file1_var', [ 'file1' ] ) diff --git a/src/nvim/testdir/test_increment.vim b/src/nvim/testdir/test_increment.vim index 6d08cd40a8..12fe52f057 100644 --- a/src/nvim/testdir/test_increment.vim +++ b/src/nvim/testdir/test_increment.vim @@ -285,7 +285,7 @@ endfunc " 1 " 1 " 1 -" Expexted: +" Expected: " 1) g Ctrl-A on block selected indented lines " 2 " 1 diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 29722ef09b..e43db4d692 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -5049,7 +5049,7 @@ func Test_quickfix_window_fails_to_open() call delete('XquickfixFails') endfunc -" Test for updating the quickfix buffer whenever the assocaited quickfix list +" Test for updating the quickfix buffer whenever the associated quickfix list " is changed. func Xqfbuf_update(cchar) call s:setup_commands(a:cchar) diff --git a/src/nvim/testdir/test_regexp_latin.vim b/src/nvim/testdir/test_regexp_latin.vim index 13e44b090f..45e60a6d44 100644 --- a/src/nvim/testdir/test_regexp_latin.vim +++ b/src/nvim/testdir/test_regexp_latin.vim @@ -686,7 +686,7 @@ func Test_matchstr_with_ze() bwipe! endfunc -" Check a pattern with a look beind crossing a line boundary +" Check a pattern with a look behind crossing a line boundary func Test_lookbehind_across_line() new call append(0, ['Behind:', 'asdfasd