Skip to content

Avoid extra blank output lines between consecutive vimscript examples #129

Open

Description

@dbarnett

I noticed vimdoc outputs some ugly extra blank lines between consecutive vimscript examples if you have something like:

""
" Example: >
"   call Foo()
" < >
"   call Bar()
" <

Actual output:

Example: >
  call Foo()
<

>
  call Bar()
<

Expected output:

Example: >
  call Foo()
< >
  call Bar()
<

The vim helpfile syntax does seem to detect those correctly as code examples and highlight both.

Activity

  1. dbarnett commented on Mar 18, 2023

    @dbarnett
    ContributorAuthor

    Note: It's not going to be very common to have multiple consecutive code examples like that since you could just combine them into one. In my case I wanted examples of just an if statement w/o the clutter of a body and closing endif, so I felt it would be a little confusing to just combine them into one code block, and too wordy to try include the endifs:

    if Foo()
    if Bar()
  2. vinsymoyya commented on Nov 14, 2026

    @vinsymoyya

    Opened #155. Consecutive code examples no longer acquire an empty text paragraph; their shared boundary is rendered as < > on one line. Explicitly blank-separated examples keep separate markers.

    Two regressions fail on upstream and all 12 local tests pass with the change. The fix also merges cleanly with the other pending Vimdoc contributions; the combined run passes 45 tests and 11 subtests. 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