Is it possible to rename a file in NERDTree? I know about the m menu but there is no rename option.
Renaming a file in NERDTREE
Use Move
, (m)ove the current node
in the m menu to rename.
You should learn to accept and vote on answers that has been helpful to you –
Myronmyrrh
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 return –
Smilax 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.
Still the best answer after 10 years and 3 months. –
Lantern
© 2022 - 2024 — McMap. All rights reserved.