Question

When I press "m" to show the menu of NERDTree, an error occured and show as below

NERDTree Menu. Use j/k/enter and the shortcuts indicated
==========================================================
Error detected while processing function <SNR>11_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

How to fix it???

Was it helpful?

Solution

To troubleshoot Vim plugin problems, first check whether it is a problem on your side:

  • Verify that the problem is not caused by your setup, by testing the plugin in isolation: Backup your .vimrc and ~/.vim / vimfiles directory, clean it, keep / reinstall just the plugin itself.
  • Maybe there's a newer version available by now. Check http://www.vim.org or the site from where you got the plugin.
  • Try reinstalling the plugin or installing on a different system.

If the problem persists, contact the plugin author. He's best suited to help you, and most interested in bugs and fixes. His email is usually found in the accompanying documentation or header of the plugin.

Some older plugins are not maintained any more by the original author. An Internet search might bring up forks or alternative implementations. If there is none, the plugin's license (usually the Vim license or a common open source one like GPL or MIT) allows you to take over maintenance and start publishing your own versions. The community is grateful for this!

OTHER TIPS

I was able to fix this by install the package through Vundle instead of putting it directly in the plugins folder.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top