From c74d5ceda1a58da2c7fdab79609690be8ac154bd Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 1 Feb 2026 08:22:13 +0800 Subject: [PATCH] vim-patch:dd9f7e6: runtime(doc): Fix some overlength lines closes: vim/vim#19286 https://github.com/vim/vim/commit/dd9f7e6cbbba6d8e63cca3b4c537dc9b8cc1837a Co-authored-by: Doug Kearns --- runtime/doc/options.txt | 46 +++++++++++++++++-------------- runtime/doc/quickfix.txt | 14 +++++----- runtime/doc/repeat.txt | 3 +- runtime/doc/tagsrch.txt | 6 ++-- runtime/doc/vimfn.txt | 3 +- runtime/lua/vim/_meta/options.lua | 46 +++++++++++++++++-------------- runtime/lua/vim/_meta/vimfn.lua | 3 +- src/nvim/eval.lua | 3 +- src/nvim/options.lua | 46 +++++++++++++++++-------------- 9 files changed, 93 insertions(+), 77 deletions(-) diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 22bda3d8b6..554fdddc5b 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -817,8 +817,9 @@ A jump table for the options with a short description can be found at |Q_op|. *'autowriteall'* *'awa'* *'noautowriteall'* *'noawa'* 'autowriteall' 'awa' boolean (default off) global - Like 'autowrite', but also used for commands ":edit", ":enew", ":quit", - ":qall", ":exit", ":xit", ":recover" and closing the Vim window. + Like 'autowrite', but also used for commands ":edit", ":enew", + ":quit", ":qall", ":exit", ":xit", ":recover" and closing the Vim + window. Setting this option also implies that Vim behaves like 'autowrite' has been set. @@ -1836,8 +1837,9 @@ A jump table for the options with a short description can be found at |Q_op|. This makes "y0" fail in the first column. *cpo-f* f When included, a ":read" command with a file name - argument will set the file name for the current buffer, - if the current buffer doesn't have a file name yet. + argument will set the file name for the current + buffer, if the current buffer doesn't have a file name + yet. *cpo-F* F When included, a ":write" command with a file name argument will set the file name for the current @@ -2219,8 +2221,8 @@ A jump table for the options with a short description can be found at |Q_op|. hiddenoff Do not use diff mode for a buffer when it becomes hidden. - iblank Ignore changes where lines are all blank. Adds - the "-B" flag to the "diff" command if + iblank Ignore changes where lines are all blank. + Adds the "-B" flag to the "diff" command if 'diffexpr' is empty. Check the documentation of the "diff" command for what this does exactly. @@ -2746,9 +2748,9 @@ A jump table for the options with a short description can be found at |Q_op|. edit a file, a check is done for the : 1. If all lines end in , and 'fileformats' includes "dos", 'fileformat' is set to "dos". - 2. If a is found and 'fileformats' includes "unix", 'fileformat' - is set to "unix". Note that when a is found without a - preceding , "unix" is preferred over "dos". + 2. If a is found and 'fileformats' includes "unix", + 'fileformat' is set to "unix". Note that when a is found + without a preceding , "unix" is preferred over "dos". 3. If 'fileformat' has not yet been set, and if a is found, and if 'fileformats' includes "mac", 'fileformat' is set to "mac". This means that "mac" is only chosen when: @@ -4221,8 +4223,8 @@ A jump table for the options with a short description can be found at |Q_op|. *'makeencoding'* *'menc'* 'makeencoding' 'menc' string (default "") global or local to buffer |global-local| - Encoding used for reading the output of external commands. When empty, - encoding is not converted. + Encoding used for reading the output of external commands. When + empty, encoding is not converted. This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`, `:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`, and `:laddfile`. @@ -6404,9 +6406,10 @@ A jump table for the options with a short description can be found at |Q_op|. highlighting is used, also for the statusline of non-current windows. * - Set highlight group to User{N}, where {N} is taken from the - minwid field, e.g. %1*. Restore normal highlight with %* or %0*. - The difference between User{N} and StatusLine will be applied to - StatusLineNC for the statusline of non-current windows. + minwid field, e.g. %1*. Restore normal highlight with %* or + %0*. The difference between User{N} and StatusLine will be + applied to StatusLineNC for the statusline of non-current + windows. The number N must be between 1 and 9. See |hl-User1..9| When displaying a flag, Vim removes the leading comma, if any, when @@ -6991,9 +6994,9 @@ A jump table for the options with a short description can be found at |Q_op|. global or local to buffer |global-local| Maximum number of changes that can be undone. Since undo information is kept in memory, higher numbers will cause more memory to be used. - Nevertheless, a single change can already use a large amount of memory. - Set to 0 for Vi compatibility: One level of undo and "u" undoes - itself: >vim + Nevertheless, a single change can already use a large amount of + memory. Set to 0 for Vi compatibility: One level of undo and "u" + undoes itself: >vim set ul=0 < But you can also get Vi compatibility by including the 'u' flag in 'cpoptions', and still be able to use CTRL-R to repeat undo. @@ -7246,10 +7249,11 @@ A jump table for the options with a short description can be found at |Q_op|. 'wildcharm' 'wcm' number (default 0) global 'wildcharm' works exactly like 'wildchar', except that it is - recognized when used inside a macro. You can find "spare" command-line - keys suitable for this option by looking at |ex-edit-index|. Normally - you'll never actually type 'wildcharm', just use it in mappings that - automatically invoke completion mode, e.g.: >vim + recognized when used inside a macro. You can find "spare" + command-line keys suitable for this option by looking at + |ex-edit-index|. Normally you'll never actually type 'wildcharm', + just use it in mappings that automatically invoke completion mode, + e.g.: >vim set wcm= cnoremap ss so $vim/sessions/*.vim < Then after typing :ss you can use CTRL-P & CTRL-N. diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index e29c362632..9b9c1d8424 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -515,8 +515,8 @@ entries parsed from lines. The following shows how to use a custom EXECUTE A COMMAND IN ALL THE BUFFERS IN QUICKFIX OR LOCATION LIST: *:cdo* -:cdo[!] {cmd} Execute {cmd} in each valid entry in the quickfix list. - It works like doing this: > +:cdo[!] {cmd} Execute {cmd} in each valid entry in the quickfix + list. It works like doing this: > :cfirst :{cmd} :cnext @@ -2022,9 +2022,9 @@ case they have to precede the letter, e.g. '%+A' or '%-G': %- do not include the matching multi-line in any output %+ include the whole matching line in the %m error string -One prefix is only useful in combination with '+' or '-', namely %G. It parses -over lines containing general information like compiler version strings or -other headers that can be skipped. +One prefix is only useful in combination with '+' or '-', namely %G. It +parses over lines containing general information like compiler version strings +or other headers that can be skipped. %-G ignore this message %+G general message @@ -2190,8 +2190,8 @@ prints information about entering a directory in the form "Making all in dir". Making all in dir2 ./dir1/dir2 Making all in dir2 ./dir1/dir2 - This can be solved by printing absolute directories in the "enter directory" - message or by printing "leave directory" messages. + This can be solved by printing absolute directories in the "enter + directory" message or by printing "leave directory" messages. To avoid this problem, ensure to print absolute directory names and "leave directory" messages. diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 66dcd257f4..a0db7ae084 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -624,7 +624,8 @@ Additionally, these commands can be used: *>bt* *>backtrace* *>where* - backtrace Show the call stacktrace for current debugging session. + backtrace Show the call stacktrace for current debugging + session. bt where *>frame* diff --git a/runtime/doc/tagsrch.txt b/runtime/doc/tagsrch.txt index 5bafacf0c9..3cd67a8e29 100644 --- a/runtime/doc/tagsrch.txt +++ b/runtime/doc/tagsrch.txt @@ -887,9 +887,9 @@ Common arguments for the commands above: When excluded, a match is ignored when the line is recognized as a comment (according to 'comments'), or the match is in a C comment (after "//" or inside `/* */`). Note that a match may be missed if a - line is recognized as a comment, but the comment ends halfway the line. - And if the line is a comment, but it is not recognized (according to - 'comments') a match may be found in it anyway. Example: > + line is recognized as a comment, but the comment ends halfway the + line. And if the line is a comment, but it is not recognized + (according to 'comments') a match may be found in it anyway. Example: > /* comment foobar */ < A match for "foobar" is found, because this line is not recognized as diff --git a/runtime/doc/vimfn.txt b/runtime/doc/vimfn.txt index 7531816662..754ed94ea3 100644 --- a/runtime/doc/vimfn.txt +++ b/runtime/doc/vimfn.txt @@ -12003,7 +12003,8 @@ win_gettype([{nr}]) *win_gettype()* win_gotoid({expr}) *win_gotoid()* Go to window with ID {expr}. This may also change the current tabpage. - Return TRUE if successful, FALSE if the window cannot be found. + Return TRUE if successful, FALSE if the window cannot be + found. Parameters: ~ • {expr} (`integer`) diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua index 0d667a7cfe..b73f7a0491 100644 --- a/runtime/lua/vim/_meta/options.lua +++ b/runtime/lua/vim/_meta/options.lua @@ -209,8 +209,9 @@ vim.o.aw = vim.o.autowrite vim.go.autowrite = vim.o.autowrite vim.go.aw = vim.go.autowrite ---- Like 'autowrite', but also used for commands ":edit", ":enew", ":quit", ---- ":qall", ":exit", ":xit", ":recover" and closing the Vim window. +--- Like 'autowrite', but also used for commands ":edit", ":enew", +--- ":quit", ":qall", ":exit", ":xit", ":recover" and closing the Vim +--- window. --- Setting this option also implies that Vim behaves like 'autowrite' has --- been set. --- @@ -1401,8 +1402,9 @@ vim.bo.ci = vim.bo.copyindent --- This makes "y0" fail in the first column. --- *cpo-f* --- f When included, a ":read" command with a file name ---- argument will set the file name for the current buffer, ---- if the current buffer doesn't have a file name yet. +--- argument will set the file name for the current +--- buffer, if the current buffer doesn't have a file name +--- yet. --- *cpo-F* --- F When included, a ":write" command with a file name --- argument will set the file name for the current @@ -1836,8 +1838,8 @@ vim.go.dex = vim.go.diffexpr --- hiddenoff Do not use diff mode for a buffer when it --- becomes hidden. --- ---- iblank Ignore changes where lines are all blank. Adds ---- the "-B" flag to the "diff" command if +--- iblank Ignore changes where lines are all blank. +--- Adds the "-B" flag to the "diff" command if --- 'diffexpr' is empty. Check the documentation --- of the "diff" command for what this does --- exactly. @@ -2451,9 +2453,9 @@ vim.bo.ff = vim.bo.fileformat --- edit a file, a check is done for the : --- 1. If all lines end in , and 'fileformats' includes "dos", --- 'fileformat' is set to "dos". ---- 2. If a is found and 'fileformats' includes "unix", 'fileformat' ---- is set to "unix". Note that when a is found without a ---- preceding , "unix" is preferred over "dos". +--- 2. If a is found and 'fileformats' includes "unix", +--- 'fileformat' is set to "unix". Note that when a is found +--- without a preceding , "unix" is preferred over "dos". --- 3. If 'fileformat' has not yet been set, and if a is found, and --- if 'fileformats' includes "mac", 'fileformat' is set to "mac". --- This means that "mac" is only chosen when: @@ -4251,8 +4253,8 @@ vim.o.mef = vim.o.makeef vim.go.makeef = vim.o.makeef vim.go.mef = vim.go.makeef ---- Encoding used for reading the output of external commands. When empty, ---- encoding is not converted. +--- Encoding used for reading the output of external commands. When +--- empty, encoding is not converted. --- This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`, --- `:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`, --- and `:laddfile`. @@ -6850,9 +6852,10 @@ vim.wo.stc = vim.wo.statuscolumn --- highlighting is used, also for the statusline of non-current --- windows. --- * - Set highlight group to User{N}, where {N} is taken from the ---- minwid field, e.g. %1*. Restore normal highlight with %* or %0*. ---- The difference between User{N} and StatusLine will be applied to ---- StatusLineNC for the statusline of non-current windows. +--- minwid field, e.g. %1*. Restore normal highlight with %* or +--- %0*. The difference between User{N} and StatusLine will be +--- applied to StatusLineNC for the statusline of non-current +--- windows. --- The number N must be between 1 and 9. See `hl-User1..9` --- --- When displaying a flag, Vim removes the leading comma, if any, when @@ -7589,9 +7592,9 @@ vim.bo.udf = vim.bo.undofile --- Maximum number of changes that can be undone. Since undo information --- is kept in memory, higher numbers will cause more memory to be used. ---- Nevertheless, a single change can already use a large amount of memory. ---- Set to 0 for Vi compatibility: One level of undo and "u" undoes ---- itself: +--- Nevertheless, a single change can already use a large amount of +--- memory. Set to 0 for Vi compatibility: One level of undo and "u" +--- undoes itself: --- --- ```vim --- set ul=0 @@ -7908,10 +7911,11 @@ vim.go.wildchar = vim.o.wildchar vim.go.wc = vim.go.wildchar --- 'wildcharm' works exactly like 'wildchar', except that it is ---- recognized when used inside a macro. You can find "spare" command-line ---- keys suitable for this option by looking at `ex-edit-index`. Normally ---- you'll never actually type 'wildcharm', just use it in mappings that ---- automatically invoke completion mode, e.g.: +--- recognized when used inside a macro. You can find "spare" +--- command-line keys suitable for this option by looking at +--- `ex-edit-index`. Normally you'll never actually type 'wildcharm', +--- just use it in mappings that automatically invoke completion mode, +--- e.g.: --- --- ```vim --- set wcm= diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua index 375f155753..f1466522b8 100644 --- a/runtime/lua/vim/_meta/vimfn.lua +++ b/runtime/lua/vim/_meta/vimfn.lua @@ -10924,7 +10924,8 @@ function vim.fn.win_gettype(nr) end --- Go to window with ID {expr}. This may also change the current --- tabpage. ---- Return TRUE if successful, FALSE if the window cannot be found. +--- Return TRUE if successful, FALSE if the window cannot be +--- found. --- --- @param expr integer --- @return 0|1 diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index f3551e9ae0..5e0adfd453 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -13222,7 +13222,8 @@ M.funcs = { desc = [=[ Go to window with ID {expr}. This may also change the current tabpage. - Return TRUE if successful, FALSE if the window cannot be found. + Return TRUE if successful, FALSE if the window cannot be + found. ]=], name = 'win_gotoid', diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 84c01a3994..e4d0e12780 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -347,8 +347,9 @@ local options = { abbreviation = 'awa', defaults = false, desc = [=[ - Like 'autowrite', but also used for commands ":edit", ":enew", ":quit", - ":qall", ":exit", ":xit", ":recover" and closing the Vim window. + Like 'autowrite', but also used for commands ":edit", ":enew", + ":quit", ":qall", ":exit", ":xit", ":recover" and closing the Vim + window. Setting this option also implies that Vim behaves like 'autowrite' has been set. ]=], @@ -1906,8 +1907,9 @@ local options = { This makes "y0" fail in the first column. *cpo-f* f When included, a ":read" command with a file name - argument will set the file name for the current buffer, - if the current buffer doesn't have a file name yet. + argument will set the file name for the current + buffer, if the current buffer doesn't have a file name + yet. *cpo-F* F When included, a ":write" command with a file name argument will set the file name for the current @@ -2422,8 +2424,8 @@ local options = { hiddenoff Do not use diff mode for a buffer when it becomes hidden. - iblank Ignore changes where lines are all blank. Adds - the "-B" flag to the "diff" command if + iblank Ignore changes where lines are all blank. + Adds the "-B" flag to the "diff" command if 'diffexpr' is empty. Check the documentation of the "diff" command for what this does exactly. @@ -3099,9 +3101,9 @@ local options = { edit a file, a check is done for the : 1. If all lines end in , and 'fileformats' includes "dos", 'fileformat' is set to "dos". - 2. If a is found and 'fileformats' includes "unix", 'fileformat' - is set to "unix". Note that when a is found without a - preceding , "unix" is preferred over "dos". + 2. If a is found and 'fileformats' includes "unix", + 'fileformat' is set to "unix". Note that when a is found + without a preceding , "unix" is preferred over "dos". 3. If 'fileformat' has not yet been set, and if a is found, and if 'fileformats' includes "mac", 'fileformat' is set to "mac". This means that "mac" is only chosen when: @@ -5548,8 +5550,8 @@ local options = { cb = 'did_set_encoding', defaults = '', desc = [=[ - Encoding used for reading the output of external commands. When empty, - encoding is not converted. + Encoding used for reading the output of external commands. When + empty, encoding is not converted. This is used for `:make`, `:lmake`, `:grep`, `:lgrep`, `:grepadd`, `:lgrepadd`, `:cfile`, `:cgetfile`, `:caddfile`, `:lfile`, `:lgetfile`, and `:laddfile`. @@ -8912,9 +8914,10 @@ local options = { highlighting is used, also for the statusline of non-current windows. * - Set highlight group to User{N}, where {N} is taken from the - minwid field, e.g. %1*. Restore normal highlight with %* or %0*. - The difference between User{N} and StatusLine will be applied to - StatusLineNC for the statusline of non-current windows. + minwid field, e.g. %1*. Restore normal highlight with %* or + %0*. The difference between User{N} and StatusLine will be + applied to StatusLineNC for the statusline of non-current + windows. The number N must be between 1 and 9. See |hl-User1..9| When displaying a flag, Vim removes the leading comma, if any, when @@ -9841,9 +9844,9 @@ local options = { desc = [=[ Maximum number of changes that can be undone. Since undo information is kept in memory, higher numbers will cause more memory to be used. - Nevertheless, a single change can already use a large amount of memory. - Set to 0 for Vi compatibility: One level of undo and "u" undoes - itself: >vim + Nevertheless, a single change can already use a large amount of + memory. Set to 0 for Vi compatibility: One level of undo and "u" + undoes itself: >vim set ul=0 < But you can also get Vi compatibility by including the 'u' flag in 'cpoptions', and still be able to use CTRL-R to repeat undo. @@ -10240,10 +10243,11 @@ local options = { defaults = 0, desc = [=[ 'wildcharm' works exactly like 'wildchar', except that it is - recognized when used inside a macro. You can find "spare" command-line - keys suitable for this option by looking at |ex-edit-index|. Normally - you'll never actually type 'wildcharm', just use it in mappings that - automatically invoke completion mode, e.g.: >vim + recognized when used inside a macro. You can find "spare" + command-line keys suitable for this option by looking at + |ex-edit-index|. Normally you'll never actually type 'wildcharm', + just use it in mappings that automatically invoke completion mode, + e.g.: >vim set wcm= cnoremap ss so $vim/sessions/*.vim < Then after typing :ss you can use CTRL-P & CTRL-N.