Mercurial > vim-gutentags
comparison autoload/gutentags/ctags.vim @ 75:d12543f11eb9
Move the default `-R` option to an overridable "global" options file.
This makes it possible for a `.gutctags` file to disable the `-R` flag.
Also fixes Github issue #33.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 27 Jul 2015 14:18:10 -0700 |
parents | 661a97eaf608 |
children | 96bfe5c37f37 |
comparison
equal
deleted
inserted
replaced
74:cb1cf815052e | 75:d12543f11eb9 |
---|---|
50 let l:cmd .= ' -p "' . a:proj_dir . '"' | 50 let l:cmd .= ' -p "' . a:proj_dir . '"' |
51 if a:write_mode == 0 && filereadable(a:tags_file) | 51 if a:write_mode == 0 && filereadable(a:tags_file) |
52 let l:full_path = expand('%:p') | 52 let l:full_path = expand('%:p') |
53 let l:cmd .= ' -s "' . l:full_path . '"' | 53 let l:cmd .= ' -s "' . l:full_path . '"' |
54 endif | 54 endif |
55 " Pass the Gutentags options file first, and then the project specific | |
56 " one, so that users can override the default behaviour. | |
57 let l:cmd .= ' -o "' . gutentags#get_res_file('ctags.options') . '"' | |
58 let l:proj_options_file = a:proj_dir . '/' . | |
59 \g:gutentags_ctags_options_file | |
60 if filereadable(l:proj_options_file) | |
61 let l:proj_options_file = s:process_options_file( | |
62 \a:proj_dir, l:proj_options_file) | |
63 let l:cmd .= ' -o "' . l:proj_options_file . '"' | |
64 endif | |
55 for ign in split(&wildignore, ',') | 65 for ign in split(&wildignore, ',') |
56 let l:cmd .= ' -x ' . '"' . ign . '"' | 66 let l:cmd .= ' -x ' . '"' . ign . '"' |
57 endfor | 67 endfor |
58 for exc in g:gutentags_exclude | 68 for exc in g:gutentags_exclude |
59 let l:cmd .= ' -x ' . '"' . exc . '"' | 69 let l:cmd .= ' -x ' . '"' . exc . '"' |
60 endfor | 70 endfor |
61 if g:gutentags_pause_after_update | 71 if g:gutentags_pause_after_update |
62 let l:cmd .= ' -c' | 72 let l:cmd .= ' -c' |
63 endif | |
64 let l:proj_options_file = a:proj_dir . '/' . | |
65 \g:gutentags_ctags_options_file | |
66 if filereadable(l:proj_options_file) | |
67 let l:proj_options_file = s:process_options_file( | |
68 \a:proj_dir, l:proj_options_file) | |
69 let l:cmd .= ' -o "' . l:proj_options_file . '"' | |
70 endif | 73 endif |
71 if g:gutentags_trace | 74 if g:gutentags_trace |
72 if has('win32') | 75 if has('win32') |
73 let l:cmd .= ' -l "' . a:tags_file . '.log"' | 76 let l:cmd .= ' -l "' . a:tags_file . '.log"' |
74 else | 77 else |