Ⅰ. 插件描述
Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'mattn/ctrlp-ghq'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'mattn/ctrlp-ghq'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'mattn/ctrlp-ghq'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/mattn/ctrlp-ghq
Ⅳ. 文档说明
# ctrlp-ghq
CtrlP extension for ghq list. Default action is lcd.

Usage
:CtrlPGhqIf may add map into your vimrc like below: >
noremap <leader>g :<c-u>CtrlPGhq<cr>Customize
When you want to do custom action for the selected line, you can do it with<c-a> key. It require following configuration:
let g:ctrlp_ghq_actions = [
\ {"label": "Open", "action": "e", "path": 1},
\ {"label": "Look", "action": "!ghq look", "path": 0},
\]label is used for displaying menu. action is used for prefix string of
command to be called. path is used for checking whether the argument should
be full-path(1) or selected string(0).
You can change default action by following configuration:
let ctrlp_ghq_default_action = 'e'If you don't set this, default action will do lcd.
You can enable cache function which stores repositories into cache file.
let g:ctrlp_ghq_cache_enabled = 1- Press
<F5>to purge the cache for the repositories under theghq.rootdirectory.
License
MIT
Author
Yasuhiro Matsumoto (a.k.a mattn)