From 92790812476f124426d8da16f6e676ba8ee34ed5 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 2 Apr 2020 19:53:45 +0300 Subject: [PATCH] Also ctag C prototypes --- vim/.vim/plugin/ctags.vim | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/vim/.vim/plugin/ctags.vim b/vim/.vim/plugin/ctags.vim index 4d98eb8..0baeb3c 100644 --- a/vim/.vim/plugin/ctags.vim +++ b/vim/.vim/plugin/ctags.vim @@ -5,7 +5,7 @@ " Create "tags" file in your project's root first. " Then :Ctags LANG to fill it. -function! s:ctags(lang, verbose) +function! s:ctags(lang, onlyCmd, verbose) let dst = tagfiles()[0] let src = "/" . join(split(dst, "/")[:-2], "/") if dst[0] != "/" @@ -15,14 +15,20 @@ function! s:ctags(lang, verbose) let cmdline = [ \'uctags', \'--languages=' . a:lang, - \'--python-kinds=-i', + \'--kind-python=-i', + \'--kind-c++=+p', \'--recurse', \] if a:verbose == v:true | let cmdline += ['--verbose'] | endif let cmdline += ['-f', dst, src] + if a:onlyCmd == v:true + echo join(cmdline, " ") + return + endif execute "!" . join(cmdline, " ") if a:verbose != v:true | redraw! | endif endfunction -command! -nargs=1 Ctags silent call s:ctags(, v:false) -command! -nargs=1 Ctagsv silent call s:ctags(, v:true) +command! -nargs=1 Ctags silent call s:ctags(, v:false, v:false) +command! -nargs=1 Ctagsv silent call s:ctags(, v:true, v:false) +command! -nargs=1 Ctagscmd call s:ctags(, v:true, v:true) -- 2.44.0