NERDTree: node not created

Using vim; I am trying to add a file (.py file) to a directory through NERDTree. I just needed to go to the directory where I want to put my file and press "m" and then "a" to name my file in the directory. The problem is that NERDTree keeps telling me this: "NERDTree: Node not created." this means that the file was not created.

Why? Did I miss something?

thanks

EDIT:

When I try to create a directory, vim (actually NERDTree) crashes and displays this error message:

Error detected while processing function <SNR>14_showMenu..30..47..NERDTreeAddNode: line 18: E716: Key not present in Dictionary: isOpen || !empty(parentNode.children) E15: Invalid expression: parentNode.isOpen || !empty(parentNode.children) Error detected while processing function <SNR>14_showMenu..30..47: line 6: E171: Missing :endif Error detected while processing function <SNR>14_showMenu..30: line 19: E171: Missing :endif 
+4
source share
5 answers

I think there is a bug with the NERD tree.

It seems to be related to spaces in directory names. Try to make a directory, and then trace the file path back to the lowest directory with a space in it. You may have created a separate directory with spaces "escaped" with a backslash. Nodes are created in this hierarchy.

Try cloning and installing this patched version - as suggested in a GWW comment - using git. This fixed the problem for me.

Alternatively, do not use NERDTree to create files if there are spaces in the path.

+5
source

Make sure you are using the latest version of NERDTree

Just look at the file ~/.vim/plugins/NERD_tree.vim and make sure that the line let s:NERD_tree_version = '4.1.0' is at the top.

Also make sure that the file ~/.vim/nerdtree_plugin/fs_menu.vim exists. This is required for nerdtree file commands.

+1
source

This functionality works fine here, so it may be related to your specific setup. Do you have valid permissions to create a file in this directory? Or maybe this has something to do with the name of your file.

0
source

This is a long shot, but I had a similar problem, and it turned out that I used symbolic links to indicate my Dropbox .vim and vimfiles directories ... and I accidentally changed the purpose of the symbolic links while cheating with seemingly unrelated material.

Recreating fixed symbolic link objects.

0
source

I know this is an old question, but I think that people still have this problem. I am a little puzzled by OS X MacVim! I think this is due to the presence of gaps in the path. The key to fixing it is updating fs_menu.vim (it is located in the ~/.vim/nerdtree_plugin/ ).

To solve this problem, I got the latest NERD tree from the official repository:

git clone https://github.com/scrooloose/nerdtree.git

Go to the cloned git repository named nerdtree:

cd nerdtree

Copy NERD_tree.vim to ~ / .vim / plugin /

cp plugin/NERD_tree.vim ~/.vim/plugin/

Copy the nerdtree_plugin folder containing fs_menu.vim

cp -r nerdtree_plugin ~/.vim/

In the previous OS X command, make sure you specify nerdtree_plugin not nerdtree_plugin/ .

0
source

All Articles