如何在单独的窗口中打开nerdtree而不是拆分?

时间:2013-11-13 08:32:20

标签: vim vim-plugin nerdtree

我希望能够在新窗口中打开nerdtree(缓冲区,如果你愿意的话),这样它就不会与当前编辑的文件分开。当我从命令行打开vim并将目录指定为参数时,会发生同样的情况。

2 个答案:

答案 0 :(得分:2)

您可以通过以下组合实现这一目标:

:NERDTree | only

答案 1 :(得分:-1)

“Split”通常与“window”同义,两者都与“buffer”不同。

从配置中删除NERDTree,你想要的是内置netrw的正常行为。请参阅:help netrw

:Ex     " open a listing of the current directory in the current window
:Sex    " open a listing of the current directory in an horizontal window
:Vex    " open a listing of the current directory in a vertical window
:Tex    " open a listing of the current directory in a new tab
:Rex    " go back to the previous listing

$ vim . " open Vim with a listing of the current directory