X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vim%2Fplugin%2Fctags.vim;h=8f66a483025529b97ee4f9edbdf92debfcef9867;hb=dd629970f623247819f0e68652341b32f7d72f7e;hp=4d98eb8ab21c5bc2a28a01cd7448464e034d3e8d;hpb=47f7d2b5f4a10a65950b0e3d5b07694bb2ce5dfa;p=dotfiles.git diff --git a/vim/.vim/plugin/ctags.vim b/vim/.vim/plugin/ctags.vim index 4d98eb8..8f66a48 100644 --- a/vim/.vim/plugin/ctags.vim +++ b/vim/.vim/plugin/ctags.vim @@ -1,11 +1,11 @@ -" Exuberant Ctags creator +" Universal Ctags creator " Maintainer: Sergey Matveev " License: GNU General Public License version 3 of the License or later " " 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] != "/" @@ -13,16 +13,22 @@ function! s:ctags(lang, verbose) let src = getcwd() endif let cmdline = [ - \'uctags', - \'--languages=' . a:lang, - \'--python-kinds=-i', - \'--recurse', + \"uctags", + \"--languages=" . a:lang, + \"--python-kinds=-i", + \"--c++-kinds=+p", + \"--recurse", \] - if a:verbose == v:true | let cmdline += ['--verbose'] | endif - let cmdline += ['-f', dst, src] + 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)