4

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
Community
  • 1
  • 1
randombits
  • 47,058
  • 76
  • 251
  • 433

3 Answers3

7

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
GWW
  • 43,129
  • 11
  • 115
  • 108
1

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.

davertron
  • 1,427
  • 1
  • 14
  • 28
0

This is a bug in the NERDTree plugin, you should send an email to the author, Marty Grenfell

too much php
  • 88,666
  • 34
  • 128
  • 138