1
- *helphelp.txt* For Vim version 9.1. Last change: 2024 Dec 15
1
+ *helphelp.txt* For Vim version 9.1. Last change: 2024 Dec 26
2
2
3
3
4
4
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -433,17 +433,31 @@ To quote a block of ex-commands verbatim, place a greater than (>) character
433
433
at the end of the line before the block and a less than (<) character as the
434
434
first non-blank on a line following the block. Any line starting in column 1
435
435
also implicitly stops the block of ex-commands before it. E.g. >
436
- function Example_Func()
437
- echo "Example"
438
- endfunction
436
+ function Example_Func()
437
+ echo "Example"
438
+ endfunction
439
439
<
440
- It's possible to add Vim syntax highlighting support to code examples. This
441
- can be done by adding "vim" after the greater than (>) character (">vim").
442
- E.g: >vim
443
- function Example_Func()
444
- echo "Example"
445
- endfunction
440
+ To enable syntax highlighting for a block of code, place a language name
441
+ annotation (e.g. "vim") after a greater than (>) character. E.g. >vim
442
+ function Example_Func()
443
+ echo "Example"
444
+ endfunction
446
445
<
446
+ *g:help_example_languages*
447
+ By default, help files only support Vim script highlighting. If you need
448
+ syntax highlighting for other languages, add to your | vimrc | : >
449
+ :let g:help_example_languages = { "vim": "vim", "sh": "bash" }
450
+ The key represents the annotation marker name, and the value is the 'syntax'
451
+ name.
452
+
453
+ Note: If you do not include "vim" in "g:help_example_languages", its syntax
454
+ highlighting will not be enabled. If you set "g:help_example_languages" to an
455
+ empty value, syntax highlighting for embedded languages will be disabled.
456
+
457
+ Further note: Including arbitrary syntax languages into help files may not
458
+ always work perfectly, if the included 'syntax' script does not account for
459
+ such an import.
460
+ *help-notation*
447
461
The following are highlighted differently in a Vim help file:
448
462
- a special key name expressed either in <> notation as in <PageDown> , or
449
463
as a Ctrl character as in CTRL-X
@@ -460,15 +474,15 @@ You can find the details in $VIMRUNTIME/syntax/help.vim
460
474
GENDER NEUTRAL LANGUAGE
461
475
462
476
*gender-neutral* *inclusion*
463
- Vim is for everybody, no matter race, gender or anything. For new or updated
464
- help text, gender neutral language is recommended. Some of the help text is
465
- many years old and there is no need to change it. We do not make any
477
+ Vim is for everybody, no matter race, gender or anything. For new or updated
478
+ help text, gender neutral language is recommended. Some of the help text is
479
+ many years old and there is no need to change it. We do not make any
466
480
assumptions about the gender of the user, no matter how the text is phrased.
467
481
The goal is that the reader understands how Vim works, the exact wording is
468
482
secondary.
469
483
470
484
Many online technical style guides include sections about gender neutral
471
- language. Here are a few: >
485
+ language. Here are a few: >
472
486
473
487
https://developers.google.com/style/pronouns
474
488
https://techwhirl.com/gender-neutral-technical-writing/
0 commit comments