forked from aniani/vim
runtime(doc): tweak documentation style in helphelp.txt
closes: #16302 Signed-off-by: h-east <h.east.727@gmail.com> Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
9b67a2e1dd
commit
b9ea0a89fa
@ -1,4 +1,4 @@
|
|||||||
*helphelp.txt* For Vim version 9.1. Last change: 2024 Dec 25
|
*helphelp.txt* For Vim version 9.1. Last change: 2024 Dec 26
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -437,31 +437,24 @@ also implicitly stops the block of ex-commands before it. E.g. >
|
|||||||
echo "Example"
|
echo "Example"
|
||||||
endfunction
|
endfunction
|
||||||
<
|
<
|
||||||
|
To enable syntax highlighting for a block of code, place a language name
|
||||||
To add annotation in the block, place the annotation (ex: "lua") after a
|
annotation (e.g. "vim") after a greater than (>) character. E.g. >vim
|
||||||
greater than (>) character. E.g: >lua
|
|
||||||
print("hello")
|
|
||||||
<
|
|
||||||
Note: uses lua syntax highlighting, if "lua" key is in
|
|
||||||
|g:help_example_languages|.
|
|
||||||
|
|
||||||
It's possible to add Vim syntax highlighting support to code examples.
|
|
||||||
E.g: >vim
|
|
||||||
function Example_Func()
|
function Example_Func()
|
||||||
echo "Example"
|
echo "Example"
|
||||||
endfunction
|
endfunction
|
||||||
<
|
<
|
||||||
*g:help_example_languages*
|
*g:help_example_languages*
|
||||||
If you want to change the syntax highlighting in the block, you can
|
By default, help files only support Vim script highlighting. If you need
|
||||||
change it like this: >
|
syntax highlighting for other languages, add to your |vimrc|: >
|
||||||
:let g:help_example_languages = #{ vim: 'vim', sh: 'bash' }
|
:let g:help_example_languages = { "vim": "vim", "sh": "bash" }
|
||||||
The key represents the annotation marker name, and the value is the 'syntax'
|
The key represents the annotation marker name, and the value is the 'syntax'
|
||||||
name. By default, help files support only Vim script highlighting.
|
name.
|
||||||
Note: When setting "g:help_example_languages", if you do not include "vim"
|
|
||||||
key, the Vim syntax highlighting will not be enabled. If you set it to an
|
Note: If you do not include "vim" in "g:help_example_languages", its syntax
|
||||||
|
highlighting will not be enabled. If you set "g:help_example_languages" to an
|
||||||
empty value, syntax highlighting for embedded languages will be disabled.
|
empty value, syntax highlighting for embedded languages will be disabled.
|
||||||
|
|
||||||
Further note: including arbitrary syntax languages into help files may not
|
Further note: Including arbitrary syntax languages into help files may not
|
||||||
always work perfectly, if the included 'syntax' script does not account for
|
always work perfectly, if the included 'syntax' script does not account for
|
||||||
such an import.
|
such an import.
|
||||||
*help-notation*
|
*help-notation*
|
||||||
@ -481,15 +474,15 @@ You can find the details in $VIMRUNTIME/syntax/help.vim
|
|||||||
GENDER NEUTRAL LANGUAGE
|
GENDER NEUTRAL LANGUAGE
|
||||||
|
|
||||||
*gender-neutral* *inclusion*
|
*gender-neutral* *inclusion*
|
||||||
Vim is for everybody, no matter race, gender or anything. For new or updated
|
Vim is for everybody, no matter race, gender or anything. For new or updated
|
||||||
help text, gender neutral language is recommended. Some of the help text is
|
help text, gender neutral language is recommended. Some of the help text is
|
||||||
many years old and there is no need to change it. We do not make any
|
many years old and there is no need to change it. We do not make any
|
||||||
assumptions about the gender of the user, no matter how the text is phrased.
|
assumptions about the gender of the user, no matter how the text is phrased.
|
||||||
The goal is that the reader understands how Vim works, the exact wording is
|
The goal is that the reader understands how Vim works, the exact wording is
|
||||||
secondary.
|
secondary.
|
||||||
|
|
||||||
Many online technical style guides include sections about gender neutral
|
Many online technical style guides include sections about gender neutral
|
||||||
language. Here are a few: >
|
language. Here are a few: >
|
||||||
|
|
||||||
https://developers.google.com/style/pronouns
|
https://developers.google.com/style/pronouns
|
||||||
https://techwhirl.com/gender-neutral-technical-writing/
|
https://techwhirl.com/gender-neutral-technical-writing/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user