google / vimdoc

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

Better @setting tag coverage #57

Closed dbarnett closed 10 years ago

dbarnett commented 10 years ago

Vimdoc will generate a @setting tag for very specific syntax like:

""
" Enable a thing.
let g:myplugin_enable_thing = 1

but there are a lot of other common cases that won't be recognized. For instance, the doc comment in:

""
" Enable a thing.
if !exists('g:myplugin_enable_thing')
  let g:myplugin_enable_thing = 1
endif

is ignored. You can get it to work by moving the doc comment down inside the if block, but it's not obvious.

To support this and other complex cases, we should support an explicit @setting NAME block directive that works like @function ... and @command ....