Mercurial > vim-gutentags
changeset 218:d7fdcb1c6a65
Merge pull request 170 from Github.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Tue, 12 Jun 2018 21:57:22 -0700 |
parents | 425157bdd024 (diff) fcb0415dceac (current diff) |
children | 91dfeaac488c 6110cf824e50 |
files | doc/gutentags.txt |
diffstat | 6 files changed, 35 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/README.md Fri Apr 13 17:24:56 2018 +0200 +++ b/README.md Tue Jun 12 21:57:22 2018 -0700 @@ -70,6 +70,12 @@ I don't want to have to think about it, and probably neither do you. +# Related Projects + +* [gutentags_plus](https://github.com/skywind3000/gutentags_plus): handles + switching between `cscope` databases automatically before performing a search + query. + [Pathogen]: https://github.com/tpope/vim-pathogen [ctrlp]: https://github.com/kien/ctrlp.vim
--- a/autoload/gutentags.vim Fri Apr 13 17:24:56 2018 +0200 +++ b/autoload/gutentags.vim Tue Jun 12 21:57:22 2018 -0700 @@ -549,7 +549,7 @@ endfunction function! gutentags#default_io_cb(chan, msg) abort - call gutentags#trace(a:msg) + call gutentags#trace(string(a:msg)) endfunction if has('nvim') @@ -563,18 +563,19 @@ endfunction function! gutentags#build_default_job_options(module) abort - let l:job_opts = { - \'on_exit': function( - \ '<SID>nvim_job_exit_wrapper', - \ ['gutentags#'.a:module.'#on_job_exit']), - \'on_stdout': function( - \ '<SID>nvim_job_out_wrapper', - \ ['gutentags#default_io_cb']), - \'on_stderr': function( - \ '<SID>nvim_job_out_wrapper', - \ ['gutentags#default_io_cb']) - \} - return l:job_opts + " Neovim kills jobs on exit, which is what we want. + let l:job_opts = { + \'on_exit': function( + \ '<SID>nvim_job_exit_wrapper', + \ ['gutentags#'.a:module.'#on_job_exit']), + \'on_stdout': function( + \ '<SID>nvim_job_out_wrapper', + \ ['gutentags#default_io_cb']), + \'on_stderr': function( + \ '<SID>nvim_job_out_wrapper', + \ ['gutentags#default_io_cb']) + \} + return l:job_opts endfunction function! gutentags#start_job(cmd, opts) abort @@ -584,10 +585,11 @@ " Vim8 job API. function! gutentags#build_default_job_options(module) abort let l:job_opts = { - \'exit_cb': 'gutentags#'.a:module.'#on_job_exit', - \'out_cb': 'gutentags#default_io_cb', - \'err_cb': 'gutentags#default_io_cb' - \} + \'exit_cb': 'gutentags#'.a:module.'#on_job_exit', + \'out_cb': 'gutentags#default_io_cb', + \'err_cb': 'gutentags#default_io_cb', + \'stoponexit': 'term' + \} return l:job_opts endfunction
--- a/autoload/gutentags/cscope.vim Fri Apr 13 17:24:56 2018 +0200 +++ b/autoload/gutentags/cscope.vim Tue Jun 12 21:57:22 2018 -0700 @@ -73,7 +73,7 @@ call add(s:added_dbs, l:dbfile_path) silent! execute 'cs add ' . fnameescape(l:dbfile_path) else - execute 'cs reset' + silent! execute 'cs reset' endif else call gutentags#warning(
--- a/doc/gutentags.txt Fri Apr 13 17:24:56 2018 +0200 +++ b/doc/gutentags.txt Tue Jun 12 21:57:22 2018 -0700 @@ -629,6 +629,11 @@ generated code database to Vim by running `:cs add` (see |:cscope|). Defaults to 1. + +People using `cscope` or `gtags_cscope` across multiple projects in the same +Vim instance might be interested in the `gutentags_plus` plugin, which handles +switching databases automatically before performing a query. +See https://github.com/skywind3000/gutentags_plus. ============================================================================= 5. Project Settings *gutentags-project-settings*
--- a/plat/unix/update_tags.sh Fri Apr 13 17:24:56 2018 +0200 +++ b/plat/unix/update_tags.sh Tue Jun 12 21:57:22 2018 -0700 @@ -117,6 +117,8 @@ done > "${TAGS_FILE}.files" fi CTAGS_ARGS="${CTAGS_ARGS} -L ${TAGS_FILE}.files" + # Clear project root if we have a file list + PROJECT_ROOT="" fi echo "Running ctags on whole project" echo "$CTAGS_EXE -f \"$TAGS_FILE.temp\" $CTAGS_ARGS \"$PROJECT_ROOT\""
--- a/plat/win32/update_tags.cmd Fri Apr 13 17:24:56 2018 +0200 +++ b/plat/win32/update_tags.cmd Tue Jun 12 21:57:22 2018 -0700 @@ -106,7 +106,6 @@ ) ) if ["%INDEX_WHOLE_PROJECT%"]==["1"] ( - set CTAGS_ARGS=%CTAGS_ARGS% "%PROJECT_ROOT%" if not ["%FILE_LIST_CMD%"]==[""] ( echo Running custom file lister >> %LOG_FILE% set use_raw_list=0 @@ -124,6 +123,8 @@ for /F "usebackq delims=" %%F in (`%FILE_LIST_CMD%`) do @echo %PROJECT_ROOT%\%%F >> %TAGS_FILE%.files ) set CTAGS_ARGS=%CTAGS_ARGS% -L %TAGS_FILE%.files + ) else ( + set CTAGS_ARGS=%CTAGS_ARGS% "%PROJECT_ROOT%" ) )