ludovicchabant/vim-gutentags

Whitelisting instead of blacklisting

eyalk11 opened this issue · 2 comments

Please allow for whitelisting the projects/file extensions I want guttentags to run on, because it is going astray , parsing many unrequired files and slows down the system.

i now see that you can specify file list commnad.

command! GutenTagRun :call gutentags#setup_gutentags() <bar> call timer_start(15,':GutentagsUpdate')<CR>

For some reason, this doesn't work. It doesn't recognize the Update command. Do you know why? (I disabled the au)

OK , my solution is :

au! gutentags_detect 

let g:gutentags_file_list_command = {
    \ 'markers': {
        \ '.git': 'git ls-files *.py *.vim',
        \ },
    \ }

function! Gut(bb) 
exec 'cd '.expand('%:p:h')
:GutentagsUpdate
endfunction 
au filetype * command! -buffer GutenTagRun :call gutentags#setup_gutentags() <bar> :call timer_start(15,'Gut')<CR>



mizlan commented

@eyalk11 Is the timer_start call necessary here? Just curious because I had a similar problem as you (wanting updates only when I explicitly wanted to update).