小智 237
在NERDTree窗口中,按'm'; 你应该在底部看到一个菜单.输入"a"以添加子节点.现在输入要创建的目录,确保在末尾添加"/",否则脚本将创建一个文件.
AFAIK NERDTree无法创建像'mkdir -p'那样的父目录.
按下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/
Run Code Online (Sandbox Code Playgroud)
按下a将使您添加一个子节点。子节点可以是文件或文件夹,具体取决于是否添加正斜杠(/)。
如果不添加如下所示的正斜杠,则会创建一个文件。
Add a childnode
==========================================================
Enter the dir/file name to be created. Dirs end with a '/'
/Library/WebServer/Documents/new-project/app/Model/file
Run Code Online (Sandbox Code Playgroud)
如果您添加如下所示的正斜杠,则会创建一个文件夹。
Add a childnode
==========================================================
Enter the dir/file name to be created. Dirs end with a '/'
/Library/WebServer/Documents/new-project/app/Model/folder/
Run Code Online (Sandbox Code Playgroud)