Winmanager,NERDTree和MiniBufExplorer

NERDTree树形浏览文件
MiniBufExplorer多文件同时编辑
Winmanager将NERDTree和MiniBufExplorer界面整合

下载
http://www.vim.org/scripts/script.php?script_id=1658
http://www.vim.org/scripts/script.php?script_id=159
http://www.vim.org/scripts/script.php?script_id=95

安装
NERDTree和Winmanager解压到.vim
MiniBufExplorer拷贝到.vim/plugin

修改.vimrc

let g:miniBufExplMapWindowNavVim = 1   
let g:miniBufExplMapWindowNavArrows = 1   
let g:miniBufExplMapCTabSwitchBufs = 1   
let g:miniBufExplModSelTarget = 1  
let g:miniBufExplMoreThanOne=0  

let g:NERDTree_title="[NERDTree]"  
let g:winManagerWindowLayout="NERDTree|TagList"  

function! NERDTree_Start()  
    exec 'NERDTree'  
endfunction  

function! NERDTree_IsValid()  
    return 1  
endfunction  

nmap wm :WMToggle<CR>  

优化
Winmanager使用时会打开一个空的文件

# .vim/plugin/winmanager.vim
function! <SID>ToggleWindowsManager()  
   if IsWinManagerVisible()  
      call s:CloseWindowsManager()  
   else  
      call s:StartWindowsManager()  
      exe 'q'   //添加
   end  
endfunction

使用
使用w^m组合键打开WMToggle

举例
WMToggle

posted @ 2016-09-07 23:42  thomas_blog  阅读(249)  评论(0编辑  收藏  举报