Mercurial > vim-gutentags
comparison autoload/gutentags/cscope.vim @ 136:286e5b3095d0
Allow restricting tag generation to files listed by custom commands
This adds a new setting, g:gutentags_file_list_command, which specifies
command(s) to use to list files for which tags should be generated,
instead of recursively examining all files within the project root.
This is useful in projects using source control to restrict tag
generation to only files tracked in the repository.
This setting is conceptually similar to CtrlP's ctrlp_user_command
option.
This implements the feature requested in
https://github.com/ludovicchabant/vim-gutentags/issues/90
author | Stephen Kent <smkent@smkent.net> |
---|---|
date | Fri, 22 Jul 2016 19:25:05 -0700 |
parents | 99b95da1bed7 |
children | e59321cbaff7 |
comparison
equal
deleted
inserted
replaced
135:4c9e2de7d46a | 136:286e5b3095d0 |
---|---|
53 function! gutentags#cscope#generate(proj_dir, tags_file, write_mode) abort | 53 function! gutentags#cscope#generate(proj_dir, tags_file, write_mode) abort |
54 let l:cmd = gutentags#get_execute_cmd() . s:runner_exe | 54 let l:cmd = gutentags#get_execute_cmd() . s:runner_exe |
55 let l:cmd .= ' -e ' . g:gutentags_cscope_executable | 55 let l:cmd .= ' -e ' . g:gutentags_cscope_executable |
56 let l:cmd .= ' -p ' . a:proj_dir | 56 let l:cmd .= ' -p ' . a:proj_dir |
57 let l:cmd .= ' -f ' . a:tags_file | 57 let l:cmd .= ' -f ' . a:tags_file |
58 let l:file_list_cmd = | |
59 \ gutentags#get_project_file_list_cmd(l:proj_dir) | |
60 if !empty(l:file_list_cmd) | |
61 let l:cmd .= ' -L "' . l:file_list_cmd . '"' | |
62 endif | |
58 let l:cmd .= ' ' | 63 let l:cmd .= ' ' |
59 let l:cmd .= gutentags#get_execute_cmd_suffix() | 64 let l:cmd .= gutentags#get_execute_cmd_suffix() |
60 | 65 |
61 call gutentags#trace("Running: " . l:cmd) | 66 call gutentags#trace("Running: " . l:cmd) |
62 call gutentags#trace("In: " . getcwd()) | 67 call gutentags#trace("In: " . getcwd()) |