From 550687ca4c3c707cf4935e4fbd86a0ea1b2a39df Mon Sep 17 00:00:00 2001 From: jez Date: Thu, 17 Mar 2011 17:11:00 -0400 Subject: [PATCH] Switch from 'Show_Extras' to 'Hide_Extras' --- doc/taglist-plus.txt | 10 ++++++++++ plugin/taglist-plus.vim | 14 +++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/doc/taglist-plus.txt b/doc/taglist-plus.txt index 21f9365..c22cffd 100644 --- a/doc/taglist-plus.txt +++ b/doc/taglist-plus.txt @@ -666,6 +666,7 @@ description of these variables refer to the text below this table. |'Tlist_Use_SingleClick'| Single click on a tag jumps to it. |'Tlist_WinHeight'| Horizontally split taglist window height. |'Tlist_WinWidth'| Vertically split taglist window width. +|'Tlist_javascript_Hide_Extras'| Hide extra tag data produced by jsctags. *'Tlist_Auto_Highlight_Tag'* Tlist_Auto_Highlight_Tag~ @@ -967,6 +968,15 @@ When new Vim windows are opened and existing windows are closed, the taglist plugin will try to maintain the width of the taglist window to the size specified by the 'Tlist_WinWidth' variable. + *'Tlist_javascript_Hide_Extras'* +Tlist_javascript_Hide_Extras~ + +To hide the type inference data generated by jsctags, modify this variable: + + let Tlist_javascript_Hide_Extras = ['type'] + +Note that 'javascript' here is not capitalized! + ============================================================================== *taglist-commands* 6. Commands~ diff --git a/plugin/taglist-plus.vim b/plugin/taglist-plus.vim index 7703828..ad29ac2 100644 --- a/plugin/taglist-plus.vim +++ b/plugin/taglist-plus.vim @@ -412,10 +412,10 @@ let s:tlist_def_javascript_settings = 'javascript;f:function;v:variable' if !exists('Tlist_javascript_Ctags_Cmd') && executable('jsctags') let Tlist_javascript_Ctags_Cmd = 'jsctags' endif -let Tlist_javascript_Ctags_Allowed_Flags = ['-f', '--sort'] -if !exists('Tlist_javascript_Show_Extras') - let Tlist_javascript_Show_Extras = ['namespace', 'type'] +if !exists('Tlist_javascript_Hide_Extras') + let Tlist_javascript_Hide_Extras = [] endif +let Tlist_javascript_Ctags_Allowed_Flags = ['-f', '--sort'] " lisp language let s:tlist_def_lisp_settings = 'lisp;f:function' @@ -2221,7 +2221,7 @@ function! s:Tlist_Get_Scope_String(tag_line, ftype) let ttxt = '' let tag_scopes = s:Tlist_Extract_Tag_Scope(a:tag_line) for [extradata_name, extradata_content] in items(tag_scopes) - if !exists('g:Tlist_{a:ftype}_Show_Extras') || match(g:Tlist_{a:ftype}_Show_Extras, extradata_name) != -1 + if match(g:Tlist_{a:ftype}_Hide_Extras, extradata_name) == -1 let ttxt = ttxt . ' [' . extradata_content . ']' endif endfor @@ -2844,11 +2844,11 @@ function! s:Tlist_Extract_Tag_Scope(tag_line) endfunction function! s:Tlist_Window_Toggle_Extra(ftype, extra_name) - let index = index(g:Tlist_{a:ftype}_Show_Extras, a:extra_name) + let index = index(g:Tlist_{a:ftype}_Hide_Extras, a:extra_name) if index == -1 - call add(g:Tlist_{a:ftype}_Show_Extras, a:extra_name) + call add(g:Tlist_{a:ftype}_Hide_Extras, a:extra_name) else - unlet g:Tlist_{a:ftype}_Show_Extras[index] + unlet g:Tlist_{a:ftype}_Hide_Extras[index] endif if s:auto_width let g:Tlist_WinWidth = 30