From 2d6a2ba16ee9777ac8c13a25210bf159444770fe Mon Sep 17 00:00:00 2001 From: blukat29 Date: Sun, 24 Aug 2014 21:44:50 +0900 Subject: Add g:easytags_suppress_report option --- README.md | 6 ++++++ autoload/xolox/easytags.vim | 14 +++++++++----- doc/easytags.txt | 9 +++++++++ 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 978b56a..46e8de3 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,12 @@ If this is set and not false, it will suppress the warning on startup if ctags i :let g:easytags_suppress_ctags_warning = 1 +### The `g:easytags_suppress_report` option + +If this is set and not false, it will suppress the report displayed on tag updates. + + :let g:easytags_suppress_report = 1 + ## Customizing the easytags plug-in Advanced users may wish to customize how the easytags plug-in works beyond the point of changing configuration defaults. This section contains some hints about this. If you have suggestions, please feel free to submit them. diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim index 5a67991..c528533 100644 --- a/autoload/xolox/easytags.vim +++ b/autoload/xolox/easytags.vim @@ -192,7 +192,9 @@ function! xolox#easytags#update(silent, filter_tags, filenames) " {{{2 if async call xolox#misc#async#call({'function': 'xolox#easytags#update#with_vim', 'arguments': [params], 'callback': 'xolox#easytags#async_callback'}) else - call s:report_results(xolox#easytags#update#with_vim(params), 0) + if !(exists('g:easytags_suppress_report') && g:easytags_suppress_report) + call s:report_results(xolox#easytags#update#with_vim(params), 0) + endif " When :UpdateTags was executed manually we'll refresh the dynamic " syntax highlighting so that new tags are immediately visible. if !a:silent && xolox#misc#option#get('easytags_auto_highlight', 1) @@ -500,10 +502,12 @@ function! xolox#easytags#syntax_groups_to_ignore() " {{{2 endfunction function! xolox#easytags#async_callback(response) " {{{2 - if has_key(a:response, 'result') - call s:report_results(a:response['result'], 1) - else - call xolox#misc#msg#warn("easytags.vim %s: Asynchronous tags file update failed! (%s at %s)", g:xolox#easytags#version, a:response['exception'], a:response['throwpoint']) + if !(exists('g:easytags_suppress_report') && g:easytags_suppress_report) + if has_key(a:response, 'result') + call s:report_results(a:response['result'], 1) + else + call xolox#misc#msg#warn("easytags.vim %s: Asynchronous tags file update failed! (%s at %s)", g:xolox#easytags#version, a:response['exception'], a:response['throwpoint']) + endif endif endfunction diff --git a/doc/easytags.txt b/doc/easytags.txt index 99ae24c..f07e8cc 100644 --- a/doc/easytags.txt +++ b/doc/easytags.txt @@ -27,6 +27,7 @@ Contents ~ 15. The |g:easytags_include_members| option 16. The |g:easytags_resolve_links| option 17. The |g:easytags_suppress_ctags_warning| option + 18. The |g:easytags_suppress_report| option 5. Customizing the easytags plug-in |customizing-easytags-plug-in| 1. Passing custom command line arguments to Exuberant Ctags |easytags-passing-custom-command-line-arguments-to-exuberant-ctags| 2. Update & highlight tags immediately after save |easytags-update-highlight-tags-immediately-after-save| @@ -468,6 +469,14 @@ is not found or not recent enough. > :let g:easytags_suppress_ctags_warning = 1 < +------------------------------------------------------------------------------- +The *g:easytags_suppress_report* option + +If this is set and not false, it will suppress the report displayed on tag +updates. +> + :let g:easytags_suppress_report = 1 +< =============================================================================== *customizing-easytags-plug-in* Customizing the easytags plug-in ~ -- cgit v1.2.3