1
0
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:
h-east 2024-12-26 10:22:46 +01:00 committed by Christian Brabandt
parent 9b67a2e1dd
commit b9ea0a89fa
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -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
@ -437,31 +437,24 @@ also implicitly stops the block of ex-commands before it. E.g. >
echo "Example"
endfunction
<
To add annotation in the block, place the annotation (ex: "lua") after a
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
To enable syntax highlighting for a block of code, place a language name
annotation (e.g. "vim") after a greater than (>) character. E.g. >vim
function Example_Func()
echo "Example"
endfunction
<
*g:help_example_languages*
If you want to change the syntax highlighting in the block, you can
change it like this: >
:let g:help_example_languages = #{ vim: 'vim', sh: 'bash' }
By default, help files only support Vim script highlighting. If you need
syntax highlighting for other languages, add to your |vimrc|: >
:let g:help_example_languages = { "vim": "vim", "sh": "bash" }
The key represents the annotation marker name, and the value is the 'syntax'
name. By default, help files support only Vim script highlighting.
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
name.
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.
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
such an import.
*help-notation*