# HG changeset patch # User Ludovic Chabant # Date 1447823480 28800 # Node ID afe1130472047be70ac370693c5539c50ae6b5d1 # Parent 7872cc9bbc2d529f9fe5e1ab545b43f395836de9 Don't generate tags on file opened if `gutentags_enabled` is false. diff -r 7872cc9bbc2d -r afe113047204 autoload/gutentags.vim --- a/autoload/gutentags.vim Wed Oct 14 19:31:50 2015 -0700 +++ b/autoload/gutentags.vim Tue Nov 17 21:11:20 2015 -0800 @@ -150,12 +150,14 @@ call add(s:known_files, l:tagfile) " Generate this new file depending on settings and stuff. - if g:gutentags_generate_on_missing && !filereadable(l:tagfile) - call gutentags#trace("Generating missing tags file: " . l:tagfile) - call s:update_tags(module, 1, 1) - elseif g:gutentags_generate_on_new - call gutentags#trace("Generating tags file: " . l:tagfile) - call s:update_tags(module, 1, 1) + if g:gutentags_enabled + if g:gutentags_generate_on_missing && !filereadable(l:tagfile) + call gutentags#trace("Generating missing tags file: " . l:tagfile) + call s:update_tags(module, 1, 1) + elseif g:gutentags_generate_on_new + call gutentags#trace("Generating tags file: " . l:tagfile) + call s:update_tags(module, 1, 1) + endif endif endif endfor