Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #95: Add g:easytags_suppress_report option
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Sep 14, 2014
2 parents 364cfcc + 2d6a2ba commit b4d5dd6
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 14 deletions.
6 changes: 6 additions & 0 deletions README.md
Expand Up @@ -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.
Expand Down
30 changes: 16 additions & 14 deletions autoload/xolox/easytags.vim
@@ -1,9 +1,9 @@
" Vim script
" Author: Peter Odding <peter@peterodding.com>
" Last Change: August 8, 2014
" Last Change: September 14, 2014
" URL: http://peterodding.com/code/vim/easytags/

let g:xolox#easytags#version = '3.6.6'
let g:xolox#easytags#version = '3.6.7'
let g:xolox#easytags#default_pattern_prefix = '\C\<'
let g:xolox#easytags#default_pattern_suffix = '\>'

Expand Down Expand Up @@ -552,18 +552,20 @@ endfunction
" Miscellaneous script-local functions. {{{1

function! s:report_results(response, async) " {{{2
let actions = []
if a:response['num_updated'] > 0
call add(actions, printf('updated %i tags', a:response['num_updated']))
endif
if a:response['num_filtered'] > 0
call add(actions, printf('filtered %i invalid tags', a:response['num_filtered']))
endif
if !empty(actions)
let function = a:async ? 'xolox#misc#msg#debug' : 'xolox#misc#msg#info'
let actions_string = xolox#misc#str#ucfirst(join(actions, ' and '))
let command_type = a:async ? 'asynchronously' : 'synchronously'
call call(function, ["easytags.vim %s: %s in %s (%s).", g:xolox#easytags#version, actions_string, a:response['elapsed_time'], command_type])
if !xolox#misc#option#get('easytags_suppress_report', 0)
let actions = []
if a:response['num_updated'] > 0
call add(actions, printf('updated %i tags', a:response['num_updated']))
endif
if a:response['num_filtered'] > 0
call add(actions, printf('filtered %i invalid tags', a:response['num_filtered']))
endif
if !empty(actions)
let function = a:async ? 'xolox#misc#msg#debug' : 'xolox#misc#msg#info'
let actions_string = xolox#misc#str#ucfirst(join(actions, ' and '))
let command_type = a:async ? 'asynchronously' : 'synchronously'
call call(function, ["easytags.vim %s: %s in %s (%s).", g:xolox#easytags#version, actions_string, a:response['elapsed_time'], command_type])
endif
endif
endfunction

Expand Down
9 changes: 9 additions & 0 deletions doc/easytags.txt
Expand Up @@ -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|
Expand Down Expand Up @@ -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 ~
Expand Down

0 comments on commit b4d5dd6

Please sign in to comment.