一、下载
git clone https://github.com/Xuyuanp/nerdtree-git-plugin.git ~/.vim/bundle/nerdtree-git-plugin
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
二、编辑vimrc
autocmd vimenter * NERDTree “Open the NERDTree automatically when vim starts up
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif "Close vim if the only window left open is a NERDTree
let NERDTreeWinPos=1 "Put the tree to the right side