# HG changeset patch # User Ludovic Chabant # Date 1444876310 25200 # Node ID 7872cc9bbc2d529f9fe5e1ab545b43f395836de9 # Parent 0424970d81f8e4a58755ab83433cd051f939dd13 Check existing tags file as an opt-in thing for now. Looks like tags files don't all start with the `!_TAG_` magic header so I'm disabling it by default for now. diff -r 0424970d81f8 -r 7872cc9bbc2d autoload/gutentags/ctags.vim --- a/autoload/gutentags/ctags.vim Fri Oct 09 15:28:39 2015 -0700 +++ b/autoload/gutentags/ctags.vim Wed Oct 14 19:31:50 2015 -0700 @@ -18,6 +18,10 @@ let g:gutentags_ctags_options_file = '.gutctags' endif +if !exists('g:gutentags_ctags_check_tagfile') + let g:gutentags_ctags_check_tagfile = 0 +endif + " }}} " Gutentags Module Interface {{{ @@ -42,7 +46,7 @@ let l:work_dir = fnamemodify(a:tags_file, ':h') let l:tags_file_exists = filereadable(a:tags_file) - if l:tags_file_exists + if l:tags_file_exists && g:gutentags_ctags_check_tagfile let l:first_lines = readfile(a:tags_file, '', 1) if len(l:first_lines) == 0 || stridx(l:first_lines[0], '!_TAG_') != 0 call gutentags#throw("File ".a:tags_file." doesn't appear to be ".