我通常:

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

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

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

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

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


当前回答

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

按CTRL - ?

其他回答

Ctrl-ww

这将在打开的窗口之间移动(因此您可以在NERDTree窗口,您正在编辑的文件和帮助窗口之间跳转,例如……只需按住Ctrl键并按w两次)。

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。

gt =下一个 gT =前一个表

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

Put set mouse=a

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

Ctrl+ww循环遍历所有窗口

Ctrl+wh带你离开一个窗口

Ctrl+wj带您进入一个窗口

Ctrl+wk带您进入一个窗口

Ctrl+wl带您进入一个窗口