简体   繁体   中英

How to create a directory using nerdtree

I have been using NERDTree for a while. Every time I need to create a new directory I need to go to terminal. Is there a quick and easy way to create a directory using NERDTree.

I read the doc but could not find anything.

When in the NERDTree window, press 'm'; you should see a menu at the bottom. Type in 'a' for add childnode. Now input the directory you want to create, making sure to add a '/' at the end, otherwise the script would create a file.

AFAIK NERDTree cannot create parent directories like 'mkdir -p' does.

Pressing m would open a menu below and you can select from a list of actions.

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/

Pressing a would let you add a childnode. A childnode can be a file or folder depending if you add a forward slash ( / ) or not.

If you don't add a forward slash like below, it would create a file.

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

If you add a forward slash like below, it would create a folder.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM