首页 > 代码库 > taglist and nerdtree

taglist and nerdtree

函数:function! s:Tlist_Window_Exit_Only_Window()中的winbunr(2)改为winbunr(3),即只剩2个窗口时关闭,考虑到2个窗口肯定是同时存在,所以这样还是可行的:

 1 function! s:Tlist_Window_Exit_Only_Window() 2   3     " Before quitting Vim, delete the taglist buffer so that 4   5     " the ‘0 mark is correctly set to the previous buffer. 6   7     if v:version < 700 8   9     if winbufnr(3) == -110  11         bdelete12  13         quit14  15     endif16  17     else18  19     if winbufnr(3) == -120  21         if tabpagenr($) == 122  23            " Only one tag page is present24  25            bdelete26  27            quit28  29         else30  31            " More than one tab page is present. Close only the current32  33            " tab page34  35            close36  37         endif38  39     endif40  41     endif42  43 endfunction

 

同时在vimrc中需要设置:let Tlist_Exit_OnlyWindow=1

 

taglist and nerdtree