Ⅰ. 插件描述
Will take you from Vim to GitHubⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'tonchis/vim-to-github'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'tonchis/vim-to-github'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'tonchis/vim-to-github'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/tonchis/vim-to-github
Ⅳ. 文档说明
# vim-to-github
Taking you from Vim to GitHub.
:ToGithubWill fire up the browser, opening the file and LOC of the current buffer in GitHub.
Visual mode is supported!
:'<,'>ToGithubToGithub makes up the url from the origin fetch url in your $ git remote -v.
If you need to hit another username do:
:ToGithub usernameIt's the same to replace the repo name:
:ToGithub username repoYou can also set a global option to copy the url in the clipboard instead of opening the browser
let g:to_github_clip_command = 'pbcopy'
let g:to_github_clipboard = 1Installation
Pathogen will do
$ cd ~/.vim/bundle
$ git clone https://github.com/tonchis/vim-to-github.gitOr just good old copy and paste.
Caveats
:ToGithub will give you a link to a specific commit. If you work and commit but don't push to GitHub, you will see a 404.