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
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
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.
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