vim安装NERDTree插件查看文件目录
https://www.vim.org/scripts/script.php?script_id=1658
解压缩之后,把 plugin/NERD_tree.vim 和doc/NERD_tree.txt分别拷贝到~/.vim/plugin 和 ~/.vim/doc 目录。
" 设置NerdTree
map <F3> :NERDTreeMirror<CR>
map <F3> :NERDTreeToggle<CR>
打完手工,vim编辑文件,按F3,看是否可以调出文件目录窗口.
Error detected while processing /home/lc/.vim/plugin/NERD_tree.vim:
line 68:
E117: Unknown function: nerdtree#runningWindows
E116: Invalid arguments for function <SNR>7_initVariable
line 96:
E117: Unknown function: nerdtree#runningWindows
E15: Invalid expression: nerdtree#runningWindows()
line 141:
E117: Unknown function: nerdtree#loadClassFiles
line 145:
E117: Unknown function: nerdtree#ui_glue#setupCommands
line 151:
E121: Undefined variable: g:NERDTreeCreator
E15: Invalid expression: "autocmd BufLeave ". g:NERDTreeCreator.BufNamePrefix() ."* if g:NERDTree.IsOpen() | call b:NERDTree.ui.saveScreenState() | endif"
line 154:
E121: Undefined variable: g:NERDTreeCreator
E15: Invalid expression: "autocmd BufEnter ". g:NERDTreeCreator.BufNamePrefix() ."* stopinsert"
line 205:
E117: Unknown function: nerdtree#postSourceActions
Press ENTER or type command to continue
解决方法:把NERDTree文件夹里面的所有东西移到~/.vim中区,问题解决.
o 打开关闭文件或者目录
t 在标签页中打开
T 后台标签页中打开
! 执行此文件
p 到上层目录
P 到根目录
K 到第一个节点
J 到最后一个节点
u 打开上层目录
m显示文件系统菜单(添加、删除、移动操作)
? 帮助
q 关闭