1 " Exuberant Ctags creator
2 " Maintainer: Sergey Matveev <stargrave@stargrave.org>
3 " License: GNU General Public License version 3 of the License or later
5 " Create "tags" file in your project's root first.
6 " Then :Ctags LANG to fill it.
8 function! s:ctags(lang, onlyCmd, verbose)
9 let dst = tagfiles()[0]
10 let src = "/" . join(split(dst, "/")[:-2], "/")
12 let dst = getcwd() . "/tags"
17 \'--languages=' . a:lang,
22 if a:verbose == v:true | let cmdline += ['--verbose'] | endif
23 let cmdline += ['-f', dst, src]
24 if a:onlyCmd == v:true
25 echo join(cmdline, " ")
28 execute "!" . join(cmdline, " ")
29 if a:verbose != v:true | redraw! | endif
32 command! -nargs=1 Ctags silent call s:ctags(<f-args>, v:false, v:false)
33 command! -nargs=1 Ctagsv silent call s:ctags(<f-args>, v:true, v:false)
34 command! -nargs=1 Ctagscmd call s:ctags(<f-args>, v:true, v:true)