Include filename is ctags call when recurse option isn't present
This commit is contained in:
parent
3d91c1d4f0
commit
7c5dc3cd7c
11
vimrc
11
vimrc
|
@ -565,9 +565,14 @@ augroup campoCmds
|
||||||
" Include local variables for C-like languages.
|
" Include local variables for C-like languages.
|
||||||
let l:ctags_cmd = 'ctags '.l:exclude_list.' '.g:campo_custom_ctags_args.' --c-types=+l --c++-types=+l -o newtags'
|
let l:ctags_cmd = 'ctags '.l:exclude_list.' '.g:campo_custom_ctags_args.' --c-types=+l --c++-types=+l -o newtags'
|
||||||
|
|
||||||
" If there's an error running ctags then this echo will cause the
|
" Add the filename to the ctags command if not running in recursive mode.
|
||||||
" error msg to be displayed on a new line.
|
let l:recursive = matchstr(g:campo_custom_ctags_args, '\(-R\s\)\|\(-R$\)\|\(--recurse=yes\)\|\(--recurse\s\)\|\(--recurse$\)')
|
||||||
echo ''
|
if l:recursive == ''
|
||||||
|
let l:ctags_cmd = l:ctags_cmd . ' ' . expand('%:t')
|
||||||
|
echo "Creating non-recursive ctags"
|
||||||
|
else
|
||||||
|
echo "Creating recursive ctags"
|
||||||
|
endif
|
||||||
|
|
||||||
" The ampersand at the end is to make this run in the background. I had to group the
|
" The ampersand at the end is to make this run in the background. I had to group the
|
||||||
" commands in parens to make the chained commands run in the background.
|
" commands in parens to make the chained commands run in the background.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user