Fix vim ctag plugin

This commit is contained in:
Jared Smith 2018-06-13 17:49:50 -07:00 committed by Geoff Harcourt
parent 51669fc552
commit 88d70fcd12

View file

@ -3,10 +3,12 @@ let g:Tlist_Ctags_Cmd="ctags --exclude='*.js'"
" Index ctags from any project, including those outside Rails
function! ReindexCtags()
let l:ctags_hook = '$(git rev-parse --show-toplevel)/.git/hooks/ctags'
let l:ctags_hook_file = "$(git rev-parse --show-toplevel)/.git/hooks/ctags"
let l:ctags_hook_path = system("echo " . l:ctags_hook_file)
let l:ctags_hook_path = substitute(l:ctags_hook_path, '\n\+$', '', '')
if exists(l:ctags_hook)
exec '!'. l:ctags_hook
if filereadable(expand(l:ctags_hook_path))
exec '!'. l:ctags_hook_file
else
exec "!ctags -R ."
endif