我通常:

选择所需的文件。 在一个选项卡中打开它(默认为t字符)。

但是我怎么能跳回NERDTree在一个选项卡中打开一个文件呢?

我现在在我的.vimrc文件中使用的临时解决方案:

map <F10> :NERDTree /path/to/root/of/my/project

但是从根目录反复开始导航并不是很有用。


当前回答

NERDTree opens up in another window. That split view you're seeing? They're called windows in vim parlance. All the window commands start with CTRL-W. To move from adjacent windows that are left and right of one another, you can change focus to the window to the left of your current window with CTRL-w h, and move focus to the right with CTRL-w l. Likewise, CTRL-w j and CTRL-w k will move you between horizontally split windows (i.e., one window is above the other). There's a lot more you can do with windows as described here.

你也可以使用:NERDTreeToggle命令来打开和关闭你的树。我通常把它绑定为t。

其他回答

ctrl-ww可能是有用的,当你有有限的选项卡打开。但当你打开太多标签时,可能会很烦人。

我再次输入:NERDTree,立即将焦点放在NERDTree选项卡上,无论光标的焦点在哪里。希望这能有所帮助

Ctrl+ww循环遍历所有窗口

Ctrl+wh带你离开一个窗口

Ctrl+wj带您进入一个窗口

Ctrl+wk带您进入一个窗口

Ctrl+wl带您进入一个窗口

如果你愿意,你可以启用鼠标支持编辑~/。vimrc文件。

Put set mouse=a

之后,你启用文件单击NERDTree。

所有的快捷方式和功能都在

按CTRL - ?

您可以通过ctrl-pgup和ctrl-pgdown来更改选项卡。在你来自NERDTree的选项卡上仍然被选中,你可以打开另一个选项卡。