google / google/vimdoc

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

Open
#74 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
306
Forks
30
PR merge metrics
No merged PRs in 30d

Description

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

For instance, given:

``` VimL
""
" @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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.