Fix vim ctag plugin
This commit is contained in:
parent
51669fc552
commit
88d70fcd12
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue