NERDTree vim 插件,尝试添加文件但没有成功
据我了解,您可以使用 NERDTree 插件直接从 MacVim 添加文件。我导航到 NERDtree 并按“m”打开 NERDTree 文件系统菜单,如本文所述: vim 和 NERD 树扩展 - 添加文件
问题是,我在调用 '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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我一直在 MacVim 中使用 NERD_tree,并且添加新文件没有任何问题。检查您使用的 NERD_tree 版本。如果您查看文件:
如果您使用的是最新版本,您应该在顶部附近看到这一行:
另外请确保 fs_menu.vim 存在(文件系统命令需要此插件)
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:
You should see this line near the top if you are using the latest version:
Also make sure that fs_menu.vim is present (this plugin is required for the file system commands)
如果您克隆 git 存储库,请确保从存储库内部运行“rake install”...我没有这样做,而是选择复制自己周围的东西,并且我错过了上面提到的 GWW 的 fs_menu.vim 文件这就是给我上面提到的错误的原因。我刚刚重新克隆了存储库并运行了“rake install”,现在一切正常。
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.
这是 NERDTree 插件中的一个错误,您应该发送电子邮件给作者, 马蒂·格伦菲尔
This is a bug in the NERDTree plugin, you should send an email to the author, Marty Grenfell