Description
The documentation says vimdoc supports multiple @usage
directives on the same command or function. This does work for very simple cases, but has quite a few bugs.
Attempting to link to such a function or command triggers errors like "Found multiple FUNCTIONs named Foo".
Each usage is independently checked against the signature and warns if any isn't an exact match for the signature. For instance, the following is perfectly correct, but vimdoc complains about it:
""
" @usage {x}
" @usage {x} {y}
function! foo#Bar(x, ...) abort
An empty @usage
directive creates a new separate usage, contrary to what the documentation says. This feature would actually be problematic/surprising in some cases where there actually is a no-arg usage, so if we really do implement it we should consider a more explicit syntax or make sure you can still have an empty @usage
directive if it comes before others or something.