-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathhelp.vim
More file actions
36 lines (32 loc) · 1.01 KB
/
help.vim
File metadata and controls
36 lines (32 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
let s:suite = themis#suite('help')
function! s:suite.after() abort
if filereadable('doc/tags')
call delete('doc/tags')
endif
endfunction
function! s:suite.__modules__() abort
let modules = themis#suite('helptags for module')
function! modules.before() abort
helptags doc
endfunction
function! modules.__each_modules__() abort
let t_func = type(function('type'))
let V = vital#vital#new()
for module_name in V.search('**')
if module_name =~# '^\%(Deprecated\|Experimental\)\.'
continue
endif
let module = V.import(module_name)
let suite = themis#suite(module_name)
for member_name in keys(module)
let args = type(module[member_name]) == t_func ? '()' : ''
let tagname = printf('Vital.%s.%s%s', module_name, member_name, args)
execute join([
\ printf('function! suite.%s()', member_name),
\ printf(' help %s', tagname),
\ 'endfunction',
\ ], "\n")
endfor
endfor
endfunction
endfunction