vimdoc
vimdoc copied to clipboard
Avoid extra blank output lines between consecutive vimscript examples
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.
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()