Mercurial > vim-gutentags
comparison autoload/gutentags/ctags.vim @ 253:ec292bfbd633
Simpler implementation for tag relative option.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 26 Oct 2019 01:48:21 -0700 |
parents | 56dc6f8e5472 |
children | 52be4cf89810 |
comparison
equal
deleted
inserted
replaced
252:56dc6f8e5472 | 253:ec292bfbd633 |
---|---|
168 " options file, so that users can override --recursive. | 168 " options file, so that users can override --recursive. |
169 " Omit --recursive if this project uses a file list command. | 169 " Omit --recursive if this project uses a file list command. |
170 let l:cmd += ['-o', '"' . gutentags#get_res_file('ctags_recursive.options') . '"'] | 170 let l:cmd += ['-o', '"' . gutentags#get_res_file('ctags_recursive.options') . '"'] |
171 endif | 171 endif |
172 if !empty(g:gutentags_ctags_extra_args) | 172 if !empty(g:gutentags_ctags_extra_args) |
173 let l:cmd += ['-O', shellescape(join(g:gutentags_ctags_extra_args))] | 173 let l:extra_args = join(g:gutentags_ctags_extra_args) |
174 if l:use_tag_relative_opt | |
175 let l:extra_args .= " --tag-relative=yes" | |
176 endif | |
177 let l:cmd += ['-O', shellescape(l:extra_args)] | |
174 endif | 178 endif |
175 if !empty(g:gutentags_ctags_post_process_cmd) | 179 if !empty(g:gutentags_ctags_post_process_cmd) |
176 let l:cmd += ['-P', shellescape(g:gutentags_ctags_post_process_cmd)] | 180 let l:cmd += ['-P', shellescape(g:gutentags_ctags_post_process_cmd)] |
177 endif | 181 endif |
178 let l:proj_options_file = a:proj_dir . '/' . | 182 let l:proj_options_file = a:proj_dir . '/' . |
189 endif | 193 endif |
190 endif | 194 endif |
191 for exc in g:gutentags_ctags_exclude | 195 for exc in g:gutentags_ctags_exclude |
192 let l:cmd += ['-x', '"' . exc . '"'] | 196 let l:cmd += ['-x', '"' . exc . '"'] |
193 endfor | 197 endfor |
194 if l:use_tag_relative_opt | |
195 let l:cmd += ['-r'] | |
196 endif | |
197 if g:gutentags_pause_after_update | 198 if g:gutentags_pause_after_update |
198 let l:cmd += ['-c'] | 199 let l:cmd += ['-c'] |
199 endif | 200 endif |
200 if g:gutentags_trace | 201 if g:gutentags_trace |
201 let l:cmd += ['-l', '"' . l:actual_tags_file . '.log"'] | 202 let l:cmd += ['-l', '"' . l:actual_tags_file . '.log"'] |