Ⅰ. 插件描述
vim gitlab issues pluginⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'sirjofri/vim-glissues'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'sirjofri/vim-glissues'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'sirjofri/vim-glissues'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/sirjofri/vim-glissues
Ⅳ. 文档说明
Vim GitLab Issue Plugin
Introduction
You want to access gitlab issues from within vim? With this plugin you can
access your issues. They are listed in a new buffer, but it requires vim
version 8 (json stuff), curl and grep.
Installation
When using [vim-pathogen][]:
cd /path/to/your/.vim/bundle
git clone https://github.com/sirjofri/vim-glissues.git
You need to setup the following global vim variables:
g:gitlab_token: Your gitlab token. You get this via gitlabs web interface.g:gitlab_server: The gitlab server you want to access. Defaults tohttps://gitlab.com. Don't use a trailing/!g:gitlab_server_port: Defaults to 443- (
g:gitlab_projectid): Your project ID. You get this via gitlabs web
interface (project settings). _This is automatically set viagit remote_! - (
g:gitlab_alter): Should the plugin send altering requests to the server?
(default true) - (
g:gitlab_debug): Print debug messages
The project id is now extracted from the git remote -v url! So you need to
run vim from somewhere inside your git repository. If you want to set your
project id manually:
_Optional_: For example I have in my .vimrc:
if filereadable(".settings.vim")
source .settings.vim
endif
This way I can put a .settings.vim in my project repository and insert
project specific vim settings. For example:
let g:gitlab_projectid="<my project id>"
As long as I start vim from the root directory of my project my settings are
here.
Commands
:GLOpenIssuesOpens your open issues in a new buffer. Provided details are
issue id (used for closing and commenting to issues via commit), title,
description and milestone.
:GLOpenIssuesExtExtended version of:GLOpenIssues, loads comments, too.:GLClosedIssuesand:GLClosedIssuesExtbehave similar with closed
issues.:GLNewIssuelet's you create a new issue with a formular. (:GLSaveto
save it)
Roadmap
- <s>Create new issue</s>
- Close issue (without commit)
- View issue details (eg. <s>comments</s>, <s>milestone</s>)
- Comment to issue
License
You are free to steal code from this repository. You are free to use it and to
redistribute it, in portions or the full product. When using the functional
code in any way you need to provide the full author information with it. If
you fork this software or distribute it in a modified way you need to use a
similar license. You should not blame me if your software crashes, your
hardware explodes, your cat dies or anything else happens. You are free to
send me a gift. I am also happy if you tell me that you like this software.
<!-- vim:tw=78:et:ts=8:sw=2:
-->