How do you delete a file using NERDTree: vim plugin page?
I have put this into my .vimrc
file:
set modifiable
but I don't know the command to delete!
Press m to bring up the NERDTree Filesystem Menu. This menu allows you to create, rename, and delete files and directories.
Put the following in your vimrc (all on one line) and you can use the "Remove" command with the normal Vim command-line arguments (such as "%" to remove the current file). It also has filename completion. :call delete(expand('%')) | bdelete!
Press m on the node you want to then select (m)ove the current node . Moving is the same as renaming. Great answer saved my life!
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.
This How to create folders in Vim (by preference using NERDTree)? should give an answer. Just type m
in NERDTree window and a dialogue appears in a QuickFix window
In addition there has been made a plugin on top of nerdtree https://github.com/ivalkeen/nerdtree-execute which allows to execute files with m
+x
-> I use it to open pdfs I get from compiling LaTeX
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