Skip to content

Add vimdoc @tag directive to render arbitrary help file tags #17

Open

Description

@Soares

Vimdoc supports auto-generated tags for most documentation items (sections, functions, commands, etc.), but doesn't have a way to render arbitrary tags.

For instance, something like this would be useful for the maktaba docs:

" @subsection Default Flags
" @tag plugin[]
" @tag plugin[commands]
" @tag plugin[settings]
" @tag plugin[autocmds]
" @tag plugin[mappings]
" @tag instant[]
" Maktaba provides a few built-in flags in every plugin that…

It might also be worth having a corresponding @link(TAG) notation for links instead of using literal helpfile link syntax, "|TAG|", so it works better for generated web documentation. But it would also be possible to process the pipe syntax explicitly and render appropriate web links in web documentation, so maybe we don't need a special directive for it.

We could cross that bridge when we come to it, of course. Or when we get around to open-sourcing vimdoc, at least.

Activity

  1. dbarnett commented on Jul 24, 2014

    @dbarnett
    Contributor

    Another detail: Some tags might come at the top and apply to the whole section, but vim help files sometimes just drop tags inline in the middle of the prose. I think we'll want to support "render a tag here" and not just "add tag for this section".

  2. vinsymoyya commented on Nov 14, 2026

    @vinsymoyya

    Opened #152. @tag name renders a literal help tag where it appears in the block, and @tag(name) renders it inline. Names such as plugin[] receive no plugin prefix; long standalone tags remain intact.

    Acceptance tests cover consecutive tags between prose, inline tags, and long names. The missing-feature cases fail on upstream; all 12 local tests pass with the implementation. README documents both forms and hosted checks are tracked on the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions