vimdoc icon indicating copy to clipboard operation
vimdoc copied to clipboard

Directives above `@usage` header only apply to first `@usage`

Open dbarnett opened this issue 11 years ago • 0 comments

If vimdoc directives are above the first @usage line in a doc comment block with multiple @usages, they only apply to the first @usage.

For instance, given:

""
" @dict SomeDict
" @usage {X}
" Foo
" @usage {X} {Y}
" Bar
function! x#Foo(…

only the first usage will get @dict SomeDict and show up in the docs as SomeDict.Foo. The second usage will show up as x#Foo since it's not considered a dict function.

This can be worked around by placing all directives that should apply to all usages after an @all directive, or by making sure they come after each @usage directive, but it's unintuitive and can bury directives that you'd expect to see on the first line.

dbarnett avatar Sep 07 '14 11:09 dbarnett