vim-patch:596ad66d1ddb (#25102)

runtime(doc): documentation updates

This is a collection of various improvements to the help pages

closes vim/vim#12790

596ad66d1d

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Houl <anwoku@yahoo.de>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl>
This commit is contained in:
zeertzjq
2023-09-12 07:37:05 +08:00
committed by GitHub
parent 65738202f8
commit 4b6023be7c
4 changed files with 21 additions and 28 deletions

View File

@@ -121,7 +121,7 @@ Vim would never have become what it is now, without the help of these people!
Eric Fischer Mac port, 'cindent', and other improvements Eric Fischer Mac port, 'cindent', and other improvements
Benji Fisher Answering lots of user questions Benji Fisher Answering lots of user questions
Bill Foster Athena GUI port (later removed) Bill Foster Athena GUI port (later removed)
Google Lets me work on Vim one day a week Google Let Bram work on Vim one day a week
Loic Grenie xvim (ideas for multi windows version) Loic Grenie xvim (ideas for multi windows version)
Sven Guckes Vim promoter and previous WWW page maintainer Sven Guckes Vim promoter and previous WWW page maintainer
Darren Hiebert Exuberant ctags Darren Hiebert Exuberant ctags

View File

@@ -240,7 +240,7 @@ The options local to a window are remembered for each buffer. This also
happens when the buffer is not loaded, but they are lost when the buffer is happens when the buffer is not loaded, but they are lost when the buffer is
wiped out |:bwipe|. wiped out |:bwipe|.
Special local window options *special-local-window-option* Special local window options *local-noglobal*
The following local window options won't be copied over when new windows are The following local window options won't be copied over when new windows are
created, thus they behave slightly differently: created, thus they behave slightly differently:
@@ -251,7 +251,7 @@ created, thus they behave slightly differently:
'winfixheight' specific to existing window 'winfixheight' specific to existing window
'winfixwidth' specific to existing window 'winfixwidth' specific to existing window
Special local buffer options *special-local-buffer-option* Special local buffer options
The following local buffer options won't be copied over when new buffers are The following local buffer options won't be copied over when new buffers are
created, thus they behave slightly differently: created, thus they behave slightly differently:
@@ -1095,7 +1095,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'bufhidden'* *'bh'* *'bufhidden'* *'bh'*
'bufhidden' 'bh' string (default "") 'bufhidden' 'bh' string (default "")
local to buffer |special-local-buffer-option| local to buffer |local-noglobal|
This option specifies what happens when a buffer is no longer This option specifies what happens when a buffer is no longer
displayed in a window: displayed in a window:
<empty> follow the global 'hidden' option <empty> follow the global 'hidden' option
@@ -1127,7 +1127,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'buftype'* *'bt'* *E382* *'buftype'* *'bt'* *E382*
'buftype' 'bt' string (default "") 'buftype' 'bt' string (default "")
local to buffer |special-local-buffer-option| local to buffer |local-noglobal|
The value of this option specifies the type of a buffer: The value of this option specifies the type of a buffer:
<empty> normal buffer <empty> normal buffer
acwrite buffer will always be written with |BufWriteCmd|s acwrite buffer will always be written with |BufWriteCmd|s
@@ -2433,7 +2433,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'filetype'* *'ft'* *'filetype'* *'ft'*
'filetype' 'ft' string (default "") 'filetype' 'ft' string (default "")
local to buffer |special-local-buffer-option| local to buffer |local-noglobal|
When this option is set, the FileType autocommand event is triggered. When this option is set, the FileType autocommand event is triggered.
All autocommands that match with the value of this option will be All autocommands that match with the value of this option will be
executed. Thus the value of 'filetype' is used in place of the file executed. Thus the value of 'filetype' is used in place of the file
@@ -4109,7 +4109,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'modified'* *'mod'* *'nomodified'* *'nomod'* *'modified'* *'mod'* *'nomodified'* *'nomod'*
'modified' 'mod' boolean (default off) 'modified' 'mod' boolean (default off)
local to buffer |special-local-buffer-option| local to buffer |local-noglobal|
When on, the buffer is considered to be modified. This option is set When on, the buffer is considered to be modified. This option is set
when: when:
1. A change was made to the text since it was last written. Using the 1. A change was made to the text since it was last written. Using the
@@ -4558,7 +4558,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'previewwindow'* *'pvw'* *'nopreviewwindow'* *'nopvw'* *E590* *'previewwindow'* *'pvw'* *'nopreviewwindow'* *'nopvw'* *E590*
'previewwindow' 'pvw' boolean (default off) 'previewwindow' 'pvw' boolean (default off)
local to window |special-local-window-option| local to window |local-noglobal|
Identifies the preview window. Only one window can have this option Identifies the preview window. Only one window can have this option
set. It's normally not set directly, but by using one of the commands set. It's normally not set directly, but by using one of the commands
|:ptag|, |:pedit|, etc. |:ptag|, |:pedit|, etc.
@@ -4628,7 +4628,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'readonly'* *'ro'* *'noreadonly'* *'noro'* *'readonly'* *'ro'* *'noreadonly'* *'noro'*
'readonly' 'ro' boolean (default off) 'readonly' 'ro' boolean (default off)
local to buffer |special-local-buffer-option| local to buffer |local-noglobal|
If on, writes fail unless you use a '!'. Protects you from If on, writes fail unless you use a '!'. Protects you from
accidentally overwriting a file. Default on when Vim is started accidentally overwriting a file. Default on when Vim is started
in read-only mode ("vim -R") or when the executable is called "view". in read-only mode ("vim -R") or when the executable is called "view".
@@ -4890,7 +4890,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'scroll'* *'scr'* *'scroll'* *'scr'*
'scroll' 'scr' number (default half the window height) 'scroll' 'scr' number (default half the window height)
local to window |special-local-window-option| local to window |local-noglobal|
Number of lines to scroll with CTRL-U and CTRL-D commands. Will be Number of lines to scroll with CTRL-U and CTRL-D commands. Will be
set to half the number of lines in the window when the window size set to half the number of lines in the window when the window size
changes. This may happen when enabling the |status-line| or changes. This may happen when enabling the |status-line| or
@@ -6240,7 +6240,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'syntax'* *'syn'* *'syntax'* *'syn'*
'syntax' 'syn' string (default "") 'syntax' 'syn' string (default "")
local to buffer |special-local-buffer-option| local to buffer |local-noglobal|
When this option is set, the syntax with this name is loaded, unless When this option is set, the syntax with this name is loaded, unless
syntax highlighting has been switched off with ":syntax off". syntax highlighting has been switched off with ":syntax off".
Otherwise this option does not always reflect the current syntax (the Otherwise this option does not always reflect the current syntax (the
@@ -7107,7 +7107,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'* *'winfixheight'* *'wfh'* *'nowinfixheight'* *'nowfh'*
'winfixheight' 'wfh' boolean (default off) 'winfixheight' 'wfh' boolean (default off)
local to window |special-local-window-option| local to window |local-noglobal|
Keep the window height when windows are opened or closed and Keep the window height when windows are opened or closed and
'equalalways' is set. Also for |CTRL-W_=|. Set by default for the 'equalalways' is set. Also for |CTRL-W_=|. Set by default for the
|preview-window| and |quickfix-window|. |preview-window| and |quickfix-window|.
@@ -7115,7 +7115,7 @@ A jump table for the options with a short description can be found at |Q_op|.
*'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'* *'winfixwidth'* *'wfw'* *'nowinfixwidth'* *'nowfw'*
'winfixwidth' 'wfw' boolean (default off) 'winfixwidth' 'wfw' boolean (default off)
local to window |special-local-window-option| local to window |local-noglobal|
Keep the window width when windows are opened or closed and Keep the window width when windows are opened or closed and
'equalalways' is set. Also for |CTRL-W_=|. 'equalalways' is set. Also for |CTRL-W_=|.
The width may be changed anyway when running out of room. The width may be changed anyway when running out of room.

View File

@@ -2125,11 +2125,11 @@ should set a variable in your vimrc file: >
:let lpc_syntax_for_c = 1 :let lpc_syntax_for_c = 1
If it doesn't work properly for some particular C or LPC files, use a If it doesn't work properly for some particular C or LPC files, use a
modeline. For a LPC file: modeline. For a LPC file: >
// vim:set ft=lpc: // vim:set ft=lpc:
For a C file that is recognized as LPC: For a C file that is recognized as LPC: >
// vim:set ft=c: // vim:set ft=c:
@@ -2161,7 +2161,7 @@ LUA *lua.vim* *ft-lua-syntax*
The Lua syntax file can be used for versions 4.0, 5.0, 5.1 and 5.2 (5.2 is The Lua syntax file can be used for versions 4.0, 5.0, 5.1 and 5.2 (5.2 is
the default). You can select one of these versions using the global variables the default). You can select one of these versions using the global variables
lua_version and lua_subversion. For example, to activate Lua lua_version and lua_subversion. For example, to activate Lua
5.1 syntax highlighting, set the variables like this: 5.1 syntax highlighting, set the variables like this: >
:let lua_version = 5 :let lua_version = 5
:let lua_subversion = 1 :let lua_subversion = 1

View File

@@ -550,28 +550,21 @@ end
-- @param o vim.option_meta -- @param o vim.option_meta
-- @return string -- @return string
local function scope_more_doc(o) local function scope_more_doc(o)
if
vim.list_contains({
'previewwindow',
'scroll',
'winfixheight',
'winfixwidth',
}, o.full_name)
then
return ' |special-local-window-option|'
end
if if
vim.list_contains({ vim.list_contains({
'bufhidden', 'bufhidden',
'buftype', 'buftype',
'filetype', 'filetype',
'modified', 'modified',
'previewwindow',
'readonly', 'readonly',
'scroll',
'syntax', 'syntax',
'winfixheight',
'winfixwidth',
}, o.full_name) }, o.full_name)
then then
return ' |special-local-buffer-option|' return ' |local-noglobal|'
end end
return '' return ''