NERDTree vim plugin that tries to add a file without success

As I understand it, you can add files directly from MacVim using the NERDTree plugin. I go to NERDtree and press "m" to open the NERDTree file system menu, as described in this post: vim and NERD Tree extension - adding a file

The problem is that I get this result after calling '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 
+4
source share
3 answers

I use NERD_tree with MacVim all the time, and I have no problem adding new files. Check which version of NERD_tree you are using. If you look at the file:

 ~/.vim/plugins/NERD_tree.vim 

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

 let s:NERD_tree_version = '4.1.0' 

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

 ~/.vim/nerdtree_plugin/fs_menu.vim 
+7
source

If you are cloning a git repository, make sure you run "rake install" from within the repo ... I didnโ€™t do this and decided to just copy things around and I skipped the fs_menu.vim GWW file mentioned above and what gave me the error mentioned above. I just cloned the repository again and ran "rake install", and now everything works fine.

+1
source

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

0
source

Source: https://habr.com/ru/post/1316456/


All Articles