Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NERDTree vim plugin, trying to add file without success

To my understanding, you can add files directly from MacVim with the NERDTree plugin. I navigate to NERDtree and hit 'm' to bring up the NERDTree filesystem menu as described in this post: vim and NERD Tree extension - adding a file

The problem is, I get this output after invoking 'm':

NERDTree Menu. Use j/k/enter and the shortcuts indicated
==========================================================
Error detected while processing function <SNR>14_showMenu..30..31:
line    4:
E716: Key not present in Dictionary: menuItems)-1)
E116: Invalid arguments for function len(self.menuItems)-1)
E116: Invalid arguments for function range(0, len(self.menuItems)-1)
E15: Invalid expression: range(0, len(self.menuItems)-1)
Press ENTER or type command to continue
like image 571
randombits Avatar asked Feb 26 '23 15:02

randombits


2 Answers

I use NERD_tree with MacVim all of the time and I have no problems adding new files. Check what version of NERD_tree you are using. If you look in the file:

~/.vim/plugins/NERD_tree.vim

You should see this line near the top if you are using the latest version:

let s:NERD_tree_version = '4.1.0'

Also make sure that fs_menu.vim is present (this plugin is required for the file system commands)

~/.vim/nerdtree_plugin/fs_menu.vim
like image 194
GWW Avatar answered Mar 07 '23 16:03

GWW


If you clone the git repository, make sure you run "rake install" from inside the repo...I didn't do this, and chose to just copy things around myself, and I missed the fs_menu.vim file that GWW mentioned above and that's what was giving me the error mentioned above. I just cloned the repository anew and ran "rake install" and everything works perfectly now.

like image 32
davertron Avatar answered Mar 07 '23 17:03

davertron