Vim minibufexpl和taglist ctrl + tab开关

时间:2011-11-04 23:25:55

标签: vim

我安装了两个最受欢迎的插件 - minibufexpl.vimtaglist.vim

每个插件分别运行良好。当我打开标签列表并点击minibufexpl中的几个不同选项卡时,缓冲区会发生变化,并且随之更改taglist菜单。问题是我使用 Ctrl + Tab Ctrl + Shift + Tab 在缓冲区之间移动并同时打开taglist菜单。然后会发生的是,实际上taglist菜单的内容会填充新缓冲区(而不是窗口的主要部分)。

这些是我使用的命令:

" --------------------
" TagList
" --------------------
" F4: Switch on/off TagList
nnoremap <silent> <F4> :TlistToggle<CR>
" TagListTagName - Used for tag names
highlight MyTagListTagName gui=bold guifg=Black guibg=Orange
" TagListTagScope - Used for tag scope
highlight MyTagListTagScope gui=NONE guifg=Blue
" TagListTitle - Used for tag titles
highlight MyTagListTitle gui=bold guifg=DarkRed guibg=LightGray
" TagListComment - Used for comments
highlight MyTagListComment guifg=DarkGreen
" TagListFileName - Used for filenames
highlight MyTagListFileName gui=bold guifg=Black guibg=LightBlue
"let Tlist_Ctags_Cmd = $VIM.'/vimfiles/ctags.exe' " location of ctags tool
let Tlist_Show_One_File = 1 " Displaying tags for only one file~
let Tlist_Exist_OnlyWindow = 1 " if you are the last, kill yourself
let Tlist_Use_Right_Window = 1 " split to the right side of the screen
let Tlist_Sort_Type = "order" " sort by order or name
let Tlist_Display_Prototype = 0 " do not show prototypes and not tags in the taglist window.
let Tlist_Compart_Format = 1 " Remove extra information and blank lines from the taglist window.
let Tlist_GainFocus_On_ToggleOpen = 1 " Jump to taglist window on open.
let Tlist_Display_Tag_Scope = 1 " Show tag scope next to the tag name.
let Tlist_Close_On_Select = 1 " Close the taglist window when a file or tag is selected.
let Tlist_Enable_Fold_Column = 0 " Don't Show the fold indicator column in the taglist window.
let Tlist_WinWidth = 40


"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"                               minibufexpl                               "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:miniBufExplMapCTabSwitchBufs = 1 "Map control-tab and control-shift-tab for switching between buffers
let g:miniBufExplUseSingleClick = 1 "Change buffer with single click on a buffer
let g:miniBufExplModSelTarget = 1 "If you use other explorers like TagList you can (As of 6.2.8) put:
let g:miniBufExplTabWrap = 1 " make tabs show complete (no broken on two lines)
let g:miniBufExplMaxSize = 1 " <max lines: defualt 0> setting this to 0 will mean the window gets as big as needed to fit all your buffers.

1 个答案:

答案 0 :(得分:2)

我遇到了同样的问题。似乎可以通过在CycleBuffer()函数内部使用TagList已经存在的FuzzyFinder修复来解决。

1598,1600c1598,1601
<   " Don't bother autoupdating the MBE window, and skip the FuzzyFinder window
<   " (Thanks toupeira!)
<   if (bufname('%') == '-MiniBufExplorer-' || bufname('%') == '[fuf]')
---
>   " Don't bother autoupdating the MBE window, and skip the FuzzyFinder and
>   " TagList  window
>   " (Thanks toupeira!) 
>   if (bufname('%') == '-MiniBufExplorer-' || bufname('%') == '[fuf]' || bufname('%') == '__Tag_List__')