2011-11-30 34 views
2

使用NERDTree時,我經常會遇到關閉所有現有緩衝區(NERDTree緩衝區除外)的情況,然後再次從NERDTree開始打開fil。make nerdtree永遠不會打開第三個窗口

這樣做的時候,NERDTree會在一個新的分割窗口中打開這些文件,比如我在左邊有NERDTree,在右邊有兩個窗口,一個是emtpy緩衝區和我想打開的文件。

我想要發生的是NERDTree在不拆分的情況下在右窗口中打開文件。

有沒有辦法告訴NERDTree永遠不會打開一個新窗口,如果已經有一個窗口可以使用?我嘗試使用「o」命令,但它的工作方式與Enter命令完全相同。

回答

0

我終於可以看nerdtree代碼檢查所有的映射,我發現我的問題的解決:我不得不改變插件。

我創造了我的變化pull請求在GitHub上: https://github.com/scrooloose/nerdtree/pull/102

更新:其實,這個問題是我用一個腳本,set buftype=nofile一個空緩衝區(它應該set buftype=)。改變之後,我的問題就消失了。

0

你從文檔

o.......Open files, directories and bookmarks....................|NERDTree-o| 

go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go| 

t.......Open selected node/bookmark in a new tab.................|NERDTree-t| 

T.......Same as 't' but keep the focus on the current tab........|NERDTree-T| 

i.......Open selected file in a split window.....................|NERDTree-i| 

gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi| 

s.......Open selected file in a new vsplit.......................|NERDTree-s| 

gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs| 

O.......Recursively open the selected directory..................|NERDTree-O| 

x.......Close the current nodes parent...........................|NERDTree-x| 

X.......Recursively close all children of the current node.......|NERDTree-X| 

e.......Edit the current dif.....................................|NERDTree-e| 
+0

是的,我有。該列表中的任何內容都不能幫助我解決問題.. –

相關問題