Ⅰ. 插件描述
search Github and clone repos with VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'gmarik/github-search-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'gmarik/github-search-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'gmarik/github-search-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/gmarik/github-search.vim
Ⅳ. 文档说明
##About
[github-search.vim] is a [Vim] plugin to search Github within [Vim].
Here's the result of running :GHSearchRepo ruby-kata:

Why?
It's faster than using the browser:
- search in browser
- copy/clone the url
- clone in terminal
- open in Vim
- I prefer Vim to study sources, so I made it easier.
Installation
If you are a [Vundle] user:
- run
:BundleInstall gmarik/github-search.vimwithin [Vim] - add
Bundle 'gmarik/github-search.vim'to your [Vundle] powered.vimrc
How-To
Run in [Vim]
:GHSearchRepo somethin to search Github for somethin.
Pressing C over the selected repo will clone the repo to ~/src/github_user/github_repo. To change the destination path, set the g:github_search_path_format variable in your vimfiles. There are three placeholders that will be replaced.:
:repo: the full Github repo path consisting of author/project, such asgmarik/github-search.vim:author: the author of the repo, in this casegmarik:project: the name of the project,github-search.vim
As an example, if you want to clone this repo to ~/projects/github-search.vim, you can do that by adding the following to your vimfiles:
let g:github_search_path_format = '~/projects/:project'
Requirements
- [Curl] - to query github
- [Git] - to clone from Github
TODO
- allow the user to specify the language for a faceted type of search
- integrate with [Vundle] to allow search for [Vim plugins]