google / vimdoc

Helpfile generation for vim
Apache License 2.0
291 stars 29 forks source link

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

Open dbarnett opened 10 years ago

dbarnett commented 10 years ago

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.