Renaming a file in NERDTREE
Asked Answered
P

2

54

Is it possible to rename a file in NERDTree? I know about the m menu but there is no rename option.

Penal answered 25/6, 2012 at 14:56 Comment(0)
M
119

Use Move, (m)ove the current node in the m menu to rename.

Myronmyrrh answered 25/6, 2012 at 15:1 Comment(5)
You should learn to accept and vote on answers that has been helpful to youMyronmyrrh
Is there a way to rename it without typing out the full path a 2nd time?Decurved
Note: it does not update the imports of other files.Leavy
Just to clarify, when you pick a node in the tree, then press "m" to reveal the hidden menu. This is crazy!Bushel
@AlexanderTsepkov The way move works is you can either type out a new path (allegedly % is a shortcut for the current directory NERDTree is open in, but I've never gotten it to work) OR you can just edit the path. So for instance if you want to rename /some/file/somewheree/thing1.txt you can just do mm and update the file path: Enter the new path for the node: /some/file/somewheree/thing1.txt <- edit thing1.txt to be thing2.txt and press returnSmilax
S
11

Just to clarify @iMom0's answer:

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.

Somatoplasm answered 30/3, 2022 at 18:34 Comment(1)
Still the best answer after 10 years and 3 months.Lantern

© 2022 - 2024 — McMap. All rights reserved.