Ⅰ. 插件描述
It tries to find out root project directory, browse project file with NERD_tree.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'janlay/nerd-tree-project'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'janlay/nerd-tree-project'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'janlay/nerd-tree-project'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/vim-scripts/NERD_tree-Project
Ⅳ. 文档说明
NERD-tree-project
A VIM plugin shows you the project directory in NERD tree.
Author: Janlay Wu <janlay@gmail.com>
Version: 0.1
Description
This plugin works together with NERD tree.
It tries to resolve root project directory for current file,
and calls NERD_tree in that directory.
If no project found, then calls NERD_tree in current directory.
Install
Install manually
First, make sure NERD tree is installed properly. Then put NERD_tree_project.vim in ~/.vim/plugin (*nix) or $HOME/vimfiles/plugin (Windows)
Use pathogen
You may want to install it with pathogen.vim:
cd ~/.vim/bundle
git clone https://github.com/scrooloose/nerdtree.git`
Usage
Type in normal mode:
ToggleNERDTree<CR>or map shortcut in your .vimrc file:
`map <F8> :ToggleNERDTree<CR>`
Customize
Make NERD_tree Project to recognize more project, such as scons:
`let g:NTPNames = add(g:NTPNames, 'SConstruct')`or add more file types:
`extend(g:NTPNames, ['*.sln', '*.csproj'])`You may want to set g:NTPNamesDirs to define directory patterns:
`let g:NTPNamesDirs = ['.git', '*.xcodeproj', '*.xcworkspace']`
License
Check the MIT license