首页 > 其他 > 详细

taglist and nerdtree

时间:2015-01-07 01:47:36      阅读:284      评论:0      收藏:0      [点我收藏+]

函数: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) == -1
10  
11         bdelete
12  
13         quit
14  
15     endif
16  
17     else
18  
19     if winbufnr(3) == -1
20  
21         if tabpagenr($) == 1
22  
23            " Only one tag page is present
24  
25            bdelete
26  
27            quit
28  
29         else
30  
31            " More than one tab page is present. Close only the current
32  
33            " tab page
34  
35            close
36  
37         endif
38  
39     endif
40  
41     endif
42  
43 endfunction

 

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

 

taglist and nerdtree

原文:http://www.cnblogs.com/wjgaas/p/4207445.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!