-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
panvimdoc.txt
851 lines (573 loc) · 31.2 KB
/
panvimdoc.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
*panvimdoc.txt* For NVIM v0.8.0 Last change: 2024 July 25
==============================================================================
Table of Contents *panvimdoc-table-of-contents*
1. panvimdoc |panvimdoc-panvimdoc|
2. TLDR |panvimdoc-tldr|
3. Usage |panvimdoc-usage|
4. Motivation |panvimdoc-motivation|
- Rationale |panvimdoc-motivation-rationale|
- Background |panvimdoc-motivation-background|
5. Goals |panvimdoc-goals|
6. Features |panvimdoc-features|
7. Specification |panvimdoc-specification|
8. References |panvimdoc-references|
9. Donate |panvimdoc-donate|
10. Specification |panvimdoc-specification|
- External includes |panvimdoc-specification-external-includes|
- Codeblocks |panvimdoc-specification-codeblocks|
11. Title |panvimdoc-title|
12. Heading |panvimdoc-heading|
- Sub Heading 2 |panvimdoc-heading-sub-heading-2|
- Markdown Links |panvimdoc-heading-markdown-links|
- Linking to help tags |panvimdoc-heading-linking-to-help-tags|
- Mappings |panvimdoc-heading-mappings|
- Table |panvimdoc-heading-table|
- Markdown only content |panvimdoc-heading-markdown-only-content|
- Vimdoc only content |panvimdoc-heading-vimdoc-only-content|
- Details and summary |panvimdoc-heading-details-and-summary|
- Keyboard HTML tag |panvimdoc-heading-keyboard-html-tag|
- Examples |panvimdoc-heading-examples|
- Examples |panvimdoc-heading-examples|
- Remove emojis |panvimdoc-heading-remove-emojis|
13. Links |panvimdoc-links|
==============================================================================
1. panvimdoc *panvimdoc-panvimdoc*
<https://kdheepak.com/panvimdoc/>
<https://github.com/kdheepak/panvimdoc/actions/workflows/test.yml?query=branch%3Amain>
<https://github.com/sponsors/kdheepak>
<https://donate.stripe.com/8wM9E7bBO9ZsbGUdQR>
Write documentation in pandoc markdown <https://pandoc.org/MANUAL.html>.
Generate documentation in vimdoc.
::: center This software is released under a MIT License. :::
==============================================================================
2. TLDR *panvimdoc-tldr*
1. Add the following to `./.github/workflows/panvimdoc.yml`:
>yaml
name: panvimdoc
on:
push:
branches: [main]
paths:
- README.md
- .github/workflows/panvimdoc.yml
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
name: pandoc to vimdoc
steps:
- uses: actions/checkout@v2
- uses: kdheepak/panvimdoc@main
with:
vimdoc: ${{ github.event.repository.name }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Auto generate docs"
branch: ${{ github.head_ref }}
<
2. `README.md` gets converted to `./doc/${{ github.event.repository.name }}.txt`
and auto-committed to the repo.
_Optional_: Add the following to `./.github/dependabot.yml` to auto update your
github action dependencies:
>
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
<
==============================================================================
3. Usage *panvimdoc-usage*
GENERATING VIMDOC USING GITHUB ACTIONS ~
Create an empty doc file:
>bash
touch doc/.gitkeep
git commit -am "Add empty doc folder"
git push
<
Then add the following to `./.github/workflows/panvimdoc.yml`:
>yaml
name: panvimdoc
on: [push]
jobs:
docs:
runs-on: ubuntu-latest
name: pandoc to vimdoc
steps:
- uses: actions/checkout@v2
- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: __VIMDOC_PROJECT_NAME_HERE__ # Output vimdoc project name (required)
# The following are all optional
pandoc: "README.md" # Input pandoc file
version: "NVIM v0.8.0" # Vim version number
toc: true # Table of contents
description: "" # Project description used in title (if empty, uses neovim version and current date)
titledatepattern: "%Y %B %d" # Pattern for the date that used in the title
demojify: false # Strip emojis from the vimdoc
dedupsubheadings: true # Add heading to subheading anchor links to ensure that subheadings are unique
treesitter: true # Use treesitter for highlighting codeblocks
ignorerawblocks: true # Ignore raw html blocks in markdown when converting to vimdoc
docmapping: false # Use h4 headers as mapping docs
docmappingprojectname: true # Use project name in tag when writing mapping docs
shiftheadinglevelby: 0 # Shift heading levels by specified number
incrementheadinglevelby: 0 # Increment heading levels by specified number
<
The only required thing for you to do is to choose a
`__VIMDOC_PROJECT_NAME_HERE__` appropriately. This is usually the name of the
plugin or the documentation file without the `.txt` extension. For example, the
following:
>yaml
- name: panvimdoc
uses: kdheepak/panvimdoc@main
with:
vimdoc: panvimdoc
<
will output a file `doc/panvimdoc.txt` and the vim help tag for it will be
`panvimdoc` using the `main` branch of the repository.
All the other options are optional.
It is recommended to pin to an exact version so you can be confident that no
surprises occur for you or your users. See
<https://github.com/kdheepak/panvimdoc/releases/latest> for which version to
use. Once you pick a version, you can pin it like so:
>yaml
- name: panvimdoc
uses: kdheepak/[email protected]
<
For an example of how this is used, see one of the following workflows:
- kdheepak/panvimdoc <./.github/workflows/panvimdoc.yml>: doc/panvimdoc.txt <./doc/panvimdoc.txt>
- kdheepak/tabline.nvim <https://github.com/kdheepak/tabline.nvim/blob/main/.github/workflows/ci.yml>:
doc/tabline.txt <https://github.com/kdheepak/tabline.nvim/blob/main/doc/tabline.txt>
Or see any of the packages here that depend on this action:
<https://github.com/kdheepak/panvimdoc/network/dependents>
GENERATING HTML USING GITHUB ACTIONS ~
If you are interested in making your vim plugin documentation available as a
HTML page, check out .github/workflows/docs.yml <./.github/workflows/docs.yml>
file.
You can find the Markdown file you are reading right now converted to HTML
here: https://kdheepak.com/panvimdoc/
Here’s an example:
>yml
name: docs
on:
push:
branches: main
permissions:
contents: write
jobs:
publish-gh-page:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
- name: pandoc markdown to html
uses: docker://pandoc/latex:3.1
with:
args: >-
--katex --from markdown+tex_math_single_backslash --to html5+smart
--template="./scripts/template.html5" --css="/panvimdoc/css/theme.css"
--css="/panvimdoc/css/skylighting-solarized-theme.css" --toc --wrap=none --metadata
title="panvimdoc" doc/panvimdoc.md --lua-filter=scripts/include-files.lua
--lua-filter=scripts/skip-blocks.lua -t html -o public/index.html
- name: deploy to GitHub pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: public
<
USING PRE-COMMIT LOCALLY ~
pre-commit <https://pre-commit.com/> lets you easily install and manage
pre-commit hooks locally.
Two hooks are available, differing only in the way dependencies are handled:
- `panvimdoc-docker`: Requires a running Docker engine on your host. All other dependencies will be loaded inside the container.
- `panvimdoc`: Runs in your local environment, so you have to make sure all dependencies of panvimdoc are installed
(i.e., `pandoc v3.0.0` or greater)
To use a hook, first install pre-commit. Then, add the following to your
`.pre-commit-config.yaml` (here `panvimdoc-docker` is used):
>yaml
- repo: 'https://github.com/kdheepak/panvimdoc'
rev: v4.0.1
hooks:
- id: panvimdoc-docker
args:
- '--project-name'
- <your-project-name>
<
You can specify additional arguments to `panvimdoc.sh` using `args`. See the
section below (or run `./panvimdoc.sh`) for the full list of arguments.
To change the input file, modify the `files` field of the hook and supply the
corresponding `--input-file` to `args`. In the example below, the hook will be
triggered if any `.md` file changes:
>yaml
- repo: 'https://github.com/kdheepak/panvimdoc'
rev: v4.0.1
hooks:
- id: panvimdoc-docker
files: ^.*\.md$
args:
- '--project-name'
- <your-project-name>
- '--input-file'
- <your-input-file.md>
<
USING IT MANUALLY LOCALLY ~
The `./panvimdoc.sh` script runs `pandoc` along with all the filters and custom
output writer.
>bash
$ ./panvimdoc.sh
Usage: ./panvimdoc.sh --project-name PROJECT_NAME --input-file INPUT_FILE --vim-version VIM_VERSION --toc TOC --description DESCRIPTION --dedup-subheadings DEDUP_SUBHEADINGS --treesitter TREESITTER
Arguments:
--project-name: the name of the project
--input-file: the input markdown file
--vim-version: the version of Vim that the project is compatible with
--toc: 'true' if the output should include a table of contents, 'false' otherwise
--description: a project description used in title (if empty, uses neovim version and current date)
--dedup-subheadings: 'true' if duplicate subheadings should be removed, 'false' otherwise
--title-date-pattern: '%Y %B %d' a pattern for the date that used in the title
--demojify: 'false' if emojis should not be removed, 'true' otherwise
--treesitter: 'true' if the project uses Tree-sitter syntax highlighting, 'false' otherwise
--ignore-rawblocks: 'true' if the project should ignore HTML raw blocks, 'false' otherwise
--doc-mapping: 'true' if the project should use h4 headers as mapping docs, 'false' otherwise
--doc-mapping-project-name: 'true' if tags generated for mapping docs contain project name, 'false' otherwise
--shift-heading-level-by: 0 if you don't want to shift heading levels , n otherwise
--increment-heading-level-by: 0 if don't want to increment the starting heading number, n otherwise
<
You will need `pandoc v3.0.0` or greater for this script to work.
==============================================================================
4. Motivation *panvimdoc-motivation*
Writing user-friendly documentation is important for every successful software
project. This is particularly true when writing documentation for users in the
world of vim plugins.
The process of writing and maintaining this documentation can often be a
cumbersome, time-consuming task. This project is aims to make that process a
little bit easier by allowing anyone to write documentation in markdown (or any
format Pandoc supports) and converting it to vimdoc automatically. This way,
plugin authors will have to write documentation just once (for example, as part
of the README of the project), and the vim documentation can be autogenerated.
RATIONALE *panvimdoc-motivation-rationale*
1. **Simplicity**: Writing in Markdown is often more intuitive for developers. By converting from
Markdown to vimdoc, authors can maintain the simplicity of Markdown while adhering to the vimdoc
standards.
2. **Unified Documentation**: Plugin authors can write their documentation just once (such as in the
project’s README) and automatically generate vim documentation, ensuring consistency and saving
time.
3. **Preserving Vim Features**: Vimdoc isn’t just plain text; it supports syntax highlighting, tags,
links, and careful formatting using whitespace. It’s essential to preserve these features when
converting to ensure the quality and usefulness of the documentation. See
<https://vimhelp.org/helphelp.txt.html#help-writing> or
`@nanotree`’s project <https://github.com/nanotee/vimdoc-notes> for more information.
4. **Leveraging Pandoc**: Unlike existing solutions, this project leverages Pandoc’s wide range of
features, including support for multiple Markdown flavors and easy-to-write custom filters in
Lua.
5. **Interoperability**: The choice of Pandoc allows for enhanced flexibility, making it easier to
extend functionality or even adapt the converter for other documentation formats in the future.
BACKGROUND *panvimdoc-motivation-background*
Writing documentation in Markdown and converting it to vimdoc is not a novel
idea.
For example, ibhagwan/ts-vimdoc.nvim
<https://github.com/ibhagwan/ts-vimdoc.nvim> is an implementation a neovim
treesitter based markdown to vimdoc converter that works fairly well. There are
no dependencies except for the Markdown treesitter parser. It is neovim only
but you can use this on github actions even for a vim plugin documentation.
There’s also wincent/docvim <https://github.com/wincent/docvim> which is
written in Haskell. Finally, there’s FooSoft/md2vim
<https://github.com/FooSoft/md2vim> which is written in Go.
However, none of these projects use Pandoc. Pandoc Markdown supports a wide
number of features: See <https://pandoc.org/MANUAL.html> for more information.
Most importantly, it supports a range of Markdown formats and flavors. And,
Pandoc has filters and a custom output writer that can be configured in lua.
Pandoc filters can extend the capability of Pandoc with minimal lua scripting,
and these are very easy to write and maintain too.
That means, with this project, you can write your Vim documentation in
Markdown, RestructuredText, AsciiDoc, etc and convert it to VimDoc, PDF, Word,
HTML etc.
==============================================================================
5. Goals *panvimdoc-goals*
By offering a specification and reference implementation for converting Pandoc
Markdown to vimdoc, this project aims to reduce friction in the documentation
process for vim plugin authors.
Here are the specific goals that guide this project:
- **Readability**: The Markdown files must render correctly when presented as README files on
platforms like GitHub, GitLab, or SourceHut.
- **Web-Friendly HTML**: If converted to HTML using Pandoc, the Markdown files must be web-friendly
and render appropriately.
- **VimDoc Features**: The generated vim documentation must support essential features like links
and tags.
- **Aesthetically Pleasing**: The vim documentation must not only be functional but also visually
pleasing in both vim and plain text files. This includes the appropriate use of columns and
spacing.
- **Guidelines**: While the format of built-in Vim documentation is a valuable reference, it is used
as a guideline rather than a specification.
==============================================================================
6. Features *panvimdoc-features*
This project offers a comprehensive suite of features designed to streamline
the conversion process from Markdown to vimdoc:
- Automatically generates titles for vim documentation.
- Creates a table of contents to enhance navigation within the document.
- Automatically handles the generation of links and tags.
- Maintains markdown syntax for tables, ensuring proper rendering.
- Allows for manual control through raw vimdoc syntax where necessary.
- Offers the ability to include multiple Markdown files, providing flexibility in documentation
structure.
==============================================================================
7. Specification *panvimdoc-specification*
The specification is described in panvimdoc.md <./doc/panvimdoc.md> along with
examples. The generated output is in panvimdoc.txt <./doc/panvimdoc.txt>. The
reference implementation of the Pandoc lua filter is in panvimdoc.lua
<./scripts/panvimdoc.lua>. See panvimdoc.sh <./panvimdoc.sh> for how to use
this script, or check the |panvimdoc-usage| section.
==============================================================================
8. References *panvimdoc-references*
- <https://learnvimscriptthehardway.stevelosh.com/chapters/54.html>
- <https://github.com/nanotee/vimdoc-notes>
- <https://github.com/mjlbach/babelfish.nvim>
- <https://foosoft.net/projects/md2vim/>
- <https://github.com/wincent/docvim>
- <https://github.com/Orange-OpenSource/pandoc-terminal-writer/>
==============================================================================
9. Donate *panvimdoc-donate*
If you’ve found this project helpful, you can show your appreciation by
sponsoring me on GitHub Sponsors <https://github.com/sponsors/kdheepak/> or
donating via Strip <https://donate.stripe.com/8wM9E7bBO9ZsbGUdQR>.
==============================================================================
10. Specification *panvimdoc-specification*
See ./panvimdoc.txt <./panvimdoc.txt> for generated output of this file.
EXTERNAL INCLUDES *panvimdoc-specification-external-includes*
Use the following in your markdown file to include any other markdown file:
>markdown
```{.include}
README.md
```
<
The path of the file is with respect to the working directory where `pandoc` is
executed.
CODEBLOCKS *panvimdoc-specification-codeblocks*
>
Multi line Code blocks are indented 4 spaces and
are formatted
appropriately with > and <.
<
Alternatively, you can use `vimdoc` as the language for the code block to write
raw text that will be inserted into the final document.
For example, the following:
>
```vimdoc
You can use codeblocks that have language as `vimdoc` to write raw vimdoc.
```
<
will be rendered verbatim in the generated documentation.
This can be used to write any custom whitespace formatted documentation in the
generated vimdoc (for mappings, options etc).
==============================================================================
11. Title *panvimdoc-title*
The first line of the documentation that is generated will look something like
this:
>
*panvimdoc.txt* For VIM - Vi IMproved 8.1 Last change: 2021 August 11
<
==============================================================================
12. Heading *panvimdoc-heading*
Main headings are numbered.
SUB HEADING 2 *panvimdoc-heading-sub-heading-2*
Sub headings are upper cased heading.
Notice that both headings and subheadings have tags.
SUB HEADING 3 ~
Sub headings are upper cased, but do not have tags. They are also not included
in the TOC. They are suffixed with `~` which highlights as **bold** text when
the file is viewed on GitHub.
MARKDOWN LINKS *panvimdoc-heading-markdown-links*
You can use markdown links in vimdoc.
>markdown
You can link to the tags by using [sub heading 2](#sub-heading-2).
<
This way, any links will work in markdown README on GitHub or on the web using
anchors AND will work as tags and links in vimdoc. The anchors are simply
dropped in vimdoc inline. The onus is on the documentation writer to choose the
correct anchor for the appropriate Markdown link.
In vimdoc tags are created when anchors to the internal document are used. If
the target is an external link, the link is inlined.
If the external link is to the neovim documentation, an internal vim link is
generated. For example:
- |cursorcolumn|
- |`completeopt`|
- vim <https://github.com/vim/vim>
- neovim <https://github.com/neovim/neovim>
This is excluded from the links section.
Lastly, if the markdown text is a url, the link is not added to the links
section and instead is placed inline.
LINKING TO HELP TAGS *panvimdoc-heading-linking-to-help-tags*
Markdown doucments may suggest help tags via |help-tag|, which are converted to
`|help-tag|` "hot links" in vimdoc.
MAPPINGS *panvimdoc-heading-mappings*
While you can use codeblocks with the language `vimdoc` to insert text in the
generated vimdoc, it can be useful to have a markdown friendly way to write
documentation for mappings.
Pandoc supports definition lists:
<https://pandoc.org/MANUAL.html#definition-lists>. This can be used to generate
documentation of mappings. All of the content in curly braces `{...}` that is
part of the header is dropped and a tag is created.
For example, the following in a markdown file:
>markdown
:FnlCompileBuffer
: Compiles current active fennel buffer
:FnlCompile[!]
: Diff compiles all indexed fennel files
If bang! is present then forcefully compiles all `source` files
:Fnl {expr}
: Executes and Evalutate {expr} of fennel
```fennel
:Fnl (print "Hello World")
:Fnl (values some_var)
```
Testing
<
becomes the following vimdoc:
>
*projectName-:FnlCompileBuffer*
:FnlCompileBuffer Compiles current active fennel buffer
*projectName-:FnlCompile*
:FnlCompile[!] Diff compiles all indexed fennel files
If bang! is present then forcefully compiles all `source` files
*projectName-:Fnl*
:Fnl {expr} Executes and Evalutate {expr} of fennel
>fennel
:Fnl (print "Hello World")
:Fnl (values some_var)
<
Testing
<
Notice that the tag `*projectName-:Command*` is generated for you.
Additionally, content in square brackets `[...]` or curly brackets `{...}` is
also dropped for creating the tag name.
i.e. the term `### :[range]Command` becomes the tag `*projectName-:Command*`.
See following mappings as examples:
*panvimdoc-pv*
pv{motion} Command that operates over {motion} moved.
*panvimdoc-pvd*
pvd Command that takes [count] lines.
*panvimdoc-:CommandName*
:[range]CommandName {doc=CommandName} Command that operates over [range].
*panvimdoc-pv*
{Visual}pv Command that operates over highlighted lines.
TABLE *panvimdoc-heading-table*
Support for markdown tables is also available:
-----------------------------------------------------------------------------------------------------
Option Background Default Description
------------------------------------ ------------ --------- -----------------------------------------
lightness light nil Change background colors lightness.
Options: 'bright', 'dim'.
darkness dark nil Change background colors darkness.
Options: 'stark', 'warm'.
solid_vert_split both false Solid |hl-VertSplit| background.
solid_line_nr both false Solid |hl-LineNr| background.
solid_float_border both false Make |hl-FloatBorder| have a more
distinguishable background highlight.
darken_noncurrent_window light false Make non-current window background darker
than Normal.
lighten_noncurrent_window dark false Make non-current window background
lighter than Normal.
italic_comments both true Make comments italicize.
darken_comments light 38 Percentage to darken comments relative to
Normal bg.
lighten_comments dark 38 Percentage to lighten comments relative
to Normal bg.
darken_non_text light 25 Percentage to darken |hl-NonText|
relative to Normal bg.
lighten_non_text dark 30 Percentage to lighten |hl-NonText|
relative to Normal bg.
darken_line_nr light 33 Percentage to darken |hl-LineNr| relative
to Normal bg.
lighten_line_nr dark 35 Percentage to lighten |hl-LineNr|
relative to Normal bg.
darken_cursor_line light 3 Percentage to darken |hl-CursorLine|
relative to Normal bg.
lighten_cursor_line dark 4 Percentage to lighten |hl-CursorLine|
relative to Normal bg.
colorize_diagnostic_underline_text both false Colorize the fg of DiagnosticUnderline*.
transparent_background both false Make background transparent.
-----------------------------------------------------------------------------------------------------
MARKDOWN ONLY CONTENT *panvimdoc-heading-markdown-only-content*
Sometimes you want to show content that is to be present in Markdown and on the
rendered view on GitHub but ignored in the generated vimdoc. This can be placed
inside `panvimdoc-ignore-{start/end}` blocks:
>
<!-- panvimdoc-ignore-start -->
<details>
<summary>Vimdoc Ignored Section</summary>
This section will ignored when generating the vimdoc file.
This will only show up in the Markdown file.
</details>
<!-- panvimdoc-ignore-end -->
<
The following will only be present in the Markdown document.
The convenient advantage of using `<!-- panvimdoc-ignore-{start/end} -->`
blocks in a HTML comment syntax is that the comment will not rendered in HTML
or on GitHub, giving the documentation writers control to present the
information differently on GitHub and in vimdoc. If you want to see examples of
this, see the raw markdown version of this file.
The only thing to keep in mind is that you must leave new line spaces before
and after a comment tag. For example, **do not** do this:
>
<!-- panvimdoc-ignore-start -->
![screenshot](./gif.gif)
<!-- panvimdoc-ignore-end -->
<
because it may cause the rest of your document to be ignored. Do this instead:
>
<!-- panvimdoc-ignore-start -->
![screenshot](./gif.gif)
<!-- panvimdoc-ignore-end -->
<
VIMDOC ONLY CONTENT *panvimdoc-heading-vimdoc-only-content*
Inversely to |panvimdoc-markdown-only-content|, sometimes you want to show
content only present in Vimdoc and hidden when viewed on Github.
This can be placed inside `panvimdoc-include-comment` comments.
As with markdown only content, you must include a blank link before and after
the comment.
>markdown
<!-- panvimdoc-include-comment You can include single lines -->
<!-- panvimdoc-include-comment
Or multiple lines
- with other
- content
- types
# And vimdoc only headings
## That can include subheadings
Infact you can include any kind of content in the comment.
-->
<
Neovim is a great text editor.
Neovim supports |lua| plugins and is also:
- Multiplatform
- Open source
DETAILS AND SUMMARY *panvimdoc-heading-details-and-summary*
You can even use `<details>` and `<summary>` tags for your README.md.
Summary ~
This section is the details.
The `html` tags are dropped and the following output is generated in the vimdoc
file.
If you are using html `<b> ... </b>` tags, use them on new lines. Inline bold
tags will have a `~` appended to the text and that may not be what you want.
KEYBOARD HTML TAG *panvimdoc-heading-keyboard-html-tag*
Use `<kbd>CMD + o</kbd>` in markdown, for example CMD + o.
EXAMPLES *panvimdoc-heading-examples*
First example
EXAMPLES *panvimdoc-heading-examples*
Second example
REMOVE EMOJIS *panvimdoc-heading-remove-emojis*
:SPARKLES: FEATURES ~
:ZAP: REQUIREMENTS ~
:PACKAGE: INSTALLATION ~
==============================================================================
13. Links *panvimdoc-links*
1. *Docs*: https:/img.shields.io/badge/docs-dev-blue.svg
2. *Build*: https:/github.com/kdheepak/panvimdoc/actions/workflows/test.yml/badge.svg?branch=main
3. *Sponsor*: https:/img.shields.io/badge/GitHub_Sponsor-%E2%9D%A4-blue
4. *Donate*: https:/img.shields.io/badge/Donate_Via_Stripe-%E2%9D%A4-blue
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl: