156

我一直在使用 NERDTree 一段时间。每次我需要创建一个新目录时,我都需要去终端。有没有一种使用 NERDTree 创建目录的快速简便的方法。

我阅读了文档,但找不到任何东西。

4

2 回答 2

261

在 NERDTree 窗口中,按“m”;你应该在底部看到一个菜单。输入“a”以添加子节点。现在输入您要创建的目录,确保在末尾添加一个“/”,否则脚本会创建一个文件。

AFAIK NERDTree 无法像“mkdir -p”那样创建父目录。

于 2010-05-22T21:59:43.713 回答
15

按下m将打开下面的菜单,您可以从操作列表中进行选择。

NERDTree Menu. Use j/k/enter and the shortcuts indicated
==========================================================
> (a)dd a childnode
  (m)ove the current node
  (d)elete the current node
  (r)eveal in Finder the current node
  (o)pen the current node with system editor
  (q)uicklook the current node
  (c)opy the current node
Add a childnode
==========================================================
Enter the dir/file name to be created. Dirs end with a '/'
/Library/WebServer/Documents/new-teacher-center/app/Model/

按下a会让你添加一个子节点。子节点可以是文件或文件夹,具体取决于您是否添加正斜杠 ( / )。

如果您不添加如下所示的正斜杠,它将创建一个文件。

Add a childnode
==========================================================
Enter the dir/file name to be created. Dirs end with a '/'
/Library/WebServer/Documents/new-project/app/Model/file

如果您添加如下所示的正斜杠,它将创建一个文件夹。

Add a childnode
==========================================================
Enter the dir/file name to be created. Dirs end with a '/'
/Library/WebServer/Documents/new-project/app/Model/folder/
于 2017-08-01T09:36:49.027 回答