Ⅰ. 插件描述
Use Vim and GitLab with easeⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'xiaogaozi/easy-gitlab-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'xiaogaozi/easy-gitlab-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'xiaogaozi/easy-gitlab-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/xiaogaozi/easy-gitlab.vim
Ⅳ. 文档说明
# easy-gitlab.vim
This plugin was forked from
github-vim, but use with GitLab.
Description
This is a quick and dirty Vim plugin to use some GitLab features locally from Vim.
It enables you to:
- Open a link to the corresponding GitLab file of a local Vim selection
- Add a comment to the corresponding GitLab commit of a locally selected line
Installation
Install using pathogen.vim, Vundle, NeoBundle, or your favorite Vim package manager.
Usage
Set g:easy_gitlab_url in your ~/.vimrc file:
let g:easy_gitlab_url = 'http://git.example.com'Then you can:
- Open selection: create a selection in visual mode and press
glo - Comment commit: on the relevant line press
glcin normal mode
To remap the keybinding in your ~/.vimrc use:
map <F5> <Plug>GitlabOpenmap <F6> <Plug>GitlabComment