The NERDTree provides two mappings you could use manually to get this effect: Typing cd on a node changes the directory to it, and typing C on a node, "enters" it via the NERDTree.
To rename a file in NerdTree, navigate to it, then press mm . It will open a prompt with the old full path already written for you, which you can modify to type the new name of the file.
To open a NERDTree panel, in normal mode, we call :NERDTree . At this point, we can open any file by typing o , or with the more convenient alias, the Enter key.
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With