X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=vim%2F.vim%2Fplugin%2Fctags.vim;h=644e50a7618fd4f6691213016f8e07039bfaf9de;hb=73a099ef9d2d01a75c13dee7efce9ece5f99dc74;hp=a76e736dc4f8528ee3ca7d9ae4569dcbc3ff80ed;hpb=50295e8d1d1b2ab4d5514d441ba28e45e7699c55;p=dotfiles.git diff --git a/vim/.vim/plugin/ctags.vim b/vim/.vim/plugin/ctags.vim index a76e736..644e50a 100644 --- a/vim/.vim/plugin/ctags.vim +++ b/vim/.vim/plugin/ctags.vim @@ -1,37 +1,4 @@ -" 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. - -if exists("g:loaded_mein_ctags") | finish | endif -let g:loaded_mein_ctags = 1 - -function! s:ctags(lang, onlyCmd, verbose) - let dst = tagfiles()[0] - let src = "/" . join(split(dst, "/")[:-2], "/") - if dst[0] != "/" - let dst = getcwd() . "/tags" - let src = getcwd() - endif - let cmdline = [ - \"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: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, 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) +if exists("*ctags#do") | finish | endif +command! -nargs=1 Ctags silent call ctags#do(, v:false, v:false) +command! -nargs=1 Ctagsv silent call ctags#do(, v:true, v:false) +command! -nargs=1 Ctagscmd call ctags#do(, v:true, v:true)