NERDTree vim插件,试图添加文件但没有成功

ran*_*its 4 vim macvim nerdtree

据我了解,您可以使用NERDTree插件直接从MacVim添加文件.我导航到NERDtree并点击'm'调出NERDTree文件系统菜单,如本文所述:vim和NERD Tree扩展 - 添加文件

问题是,我在调用'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
Run Code Online (Sandbox Code Playgroud)

GWW*_*GWW 7

我一直使用NERD_tree和MacVim,我没有添加新文件的问题.检查您正在使用的NERD_tree版本.如果你查看文件:

~/.vim/plugins/NERD_tree.vim
Run Code Online (Sandbox Code Playgroud)

如果您使用的是最新版本,则应该在顶部附近看到此行:

let s:NERD_tree_version = '4.1.0'
Run Code Online (Sandbox Code Playgroud)

还要确保存在fs_menu.vim(此插件是文件系统命令所必需的)

~/.vim/nerdtree_plugin/fs_menu.vim
Run Code Online (Sandbox Code Playgroud)