『插件介绍』
NERDTree是个树结构目录浏览插件
『下载和安装』
1. .vimrc下载
插件地址 http://www.vim.org/scripts/script.php?script_id=1658
VIM中 :h NERDTree 看详细说明2. .vimrc配置
"NERDTree配置{{{
map <F1> :NERDTreeToggle<CR>
map <C-F1> :NERDTreeFind<CR>
let NERDTreeChDirMode=2 "选中root即设置为当前目录
let NERDTreeQuitOnOpen=1 "打开文件时关闭树
let NERDTreeShowBookmarks=1 "显示书签
let NERDTreeMinimalUI=1 "不显示帮助面板
let NERDTreeDirArrows=1 "目录箭头 1 显示箭头 0传统+-|号
"}}}
『基本功能使用方法』
1. 常用命令
NERDTreeToggle “打开 关闭树
NERDTree [<start-directory> | <bookmark>] “这个配合标签用起来很爽
NERDTreeFind “在树中找到当前文件
Bookmark <name> “mark个书签
BookmarkToRoot <bookmark> “打开书签并设置为root,用pwd查看当前工作目录
ClearBookmarks [<bookmarks>] “清除书签
2. 常用快捷(在NERDTree面板下)
o…….Open files, directories and bookmarks………………..|NERDTree-o|
go……Open selected file, but leave cursor in the NERDTree…..|NERDTree-go|
t…….Open selected node/bookmark in a new tab……………..|NERDTree-t|
T…….Same as ‘t’ but keep the focus on the current tab……..|NERDTree-T|
i…….Open selected file in a split window…………………|NERDTree-i|
gi……Same as i, but leave the cursor on the NERDTree……….|NERDTree-gi|
s…….Open selected file in a new vsplit…………………..|NERDTree-s|
gs……Same as s, but leave the cursor on the NERDTree……….|NERDTree-gs|
O…….Recursively open the selected directory………………|NERDTree-O|
x…….Close the current nodes parent………………………|NERDTree-x|
X…….Recursively close all children of the current node…….|NERDTree-X|
e…….Edit the current dif……………………………….|NERDTree-e|
D…….Delete the current bookmark ………………………..|NERDTree-D|
P…….Jump to the root node………………………………|NERDTree-P|
p…….Jump to current nodes parent………………………..|NERDTree-p|
K…….Jump up inside directories at the current tree depth…..|NERDTree-K|
J…….Jump down inside directories at the current tree depth…|NERDTree-J|
<C-J>…Jump down to the next sibling of the current directory…|NERDTree-C-J|
<C-K>…Jump up to the previous sibling of the current directory.|NERDTree-C-K|
C…….Change the tree root to the selected dir……………..|NERDTree-C|
u…….Move the tree root up one directory………………….|NERDTree-u|
U…….Same as ‘u’ except the old root node is left open……..|NERDTree-U|
r…….Recursively refresh the current directory…………….|NERDTree-r|
R…….Recursively refresh the current root…………………|NERDTree-R|
m…….Display the NERD tree menu………………………….|NERDTree-m|
cd……Change the CWD to the dir of the selected node………..|NERDTree-cd|
I…….Toggle whether hidden files displayed………………..|NERDTree-I|
f…….Toggle whether the file filters are used……………..|NERDTree-f|
F…….Toggle whether files are displayed…………………..|NERDTree-F|
B…….Toggle whether the bookmark table is displayed………..|NERDTree-B|
q…….Close the NERDTree window…………………………..|NERDTree-q|
A…….Zoom (maximize/minimize) the NERDTree window………….|NERDTree-A|
?…….Toggle the display of the quick help…………………|NERDTree-?|