【问题标题】:How do I open nerdtree in separate window rather than split?如何在单独的窗口中打开 nerdtree 而不是拆分?
【发布时间】:2013-11-13 17:13:50
【问题描述】:

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

【问题讨论】:

    标签: vim vim-plugin nerdtree


    【解决方案1】:

    您可以通过以下组合实现:

    :NERDTree | only
    

    【讨论】:

    • 这正是我想要的。谢谢。
    【解决方案2】:

    “拆分”通常与“窗口”同义,两者都与“缓冲区”不同。

    从你的配置中移除 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
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-11-06
      • 2022-11-27
      • 2011-08-12
      • 1970-01-01
      • 1970-01-01
      • 2016-10-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多