Ⅰ. 插件描述
Plugin to search www.GrepPage.comⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'evidanary/grepg-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'evidanary/grepg-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'evidanary/grepg-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/evidanary/grepg.vim
Ⅳ. 文档说明
# grepg.vim #
grepg.vim shows results from GrepPage in a scratch buffer. It saves you from the expensive context switch of opening the browser while programming in Vim.
This plugin is a front for grepg. grepg is a commandline tool for GrepPage.

Usage
:G search_query
grepg.vim is triggered by typing :G followed by the search query.
Microdocuments / snippets containing the search term will be listed in a scratch buffer. grepg client returns a description followed by the code on the other line. Each microdocument is separated by an empty line.
Examples
:G markdown image
Searches for "markdown image" in all publicly contributed snippets if no auth is set. To search private data you need to set up auth in the command line client using grepg configure
:G vim new tab
Searches the for string "vim new tab".
Requirements
grepg version 0.1.4 and higher
See grepg's README for its installation instructions.
But basically, you will do:
$ pip install grepgInstallation
Most people use a plugin to manage their vim plugins. I prefer vim-pathogen. Installation of vim pathogen is dead simple, you just need 2 lines in your .vimrc. Here are some other plugin managers:vim-plug, Vundle.vim
To install with pathogen:
cd ~/.vim/bundle && git clone https://github.com/evidanary/grepg.vim grepgNote: If you don't use any sort of Vim plugin manager, then do this:
cd ~/.vim/bundle && git clone https://github.com/evidanary/grepg.vim grepg && echo "set runtimepath^=~/.vim/bundle/grepg" >> ~/.vimrcConfiguration
Make sure the grepg client works correctly. You will need to run grepg configure if you need to access private data.
License
grepg.vim is under the MIT License.