Switch from 'Show_Extras' to 'Hide_Extras'

This commit is contained in:
jez 2011-03-17 17:11:00 -04:00
parent 3733440ed0
commit 550687ca4c
2 changed files with 17 additions and 7 deletions

View File

@ -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~

View File

@ -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