ght.vim


Ⅰ. 插件描述

GitHub Templates — GitHub issue and pull request template support

Ⅱ. 基本信息

创建日期:  2016-07-29
使用用户:  1
Github星:  9
插件作者:  Nik Kantar

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'nkantar/ght-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'nkantar/ght-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'nkantar/ght-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/nkantar/ght.vim

Ⅳ. 文档说明

# GHT.vim

GitHub Templates — GitHub issue and pull request template support

ght

What + Why

GHT allows for quick editing of issue and pull request text based on the templates GitHub supports.

I like writing in Vim so much that I found myself copy/pasting the template text from the new issue and pull request pages at first, and then from the files in the repository afterwards, only to have to copy/paste it all back into GitHub before dealing with labels, milestones, and assignees. This plugin makes that process far less annoying, by only requiring the second copy/paste. :scissors::page_facing_up::scream:

Also, one ought to know how to customize one's editor of choice, and now I know some basic vimscript. :thumbsup:

Say Thanks!

Installation

Vundle

Plugin 'nkantar/GHT.vim'

Usage

:GHTIssue
:GHTPR

Each of these commands looks for the appropriate template (/.github/ISSUE_TEMPLATE.md and /.github/PULL_REQUEST_TEMPLATE.md) in the repository's root. If no file is found, an error message is shown. If it is found, a new scratch buffer is opened with the contents of the file.

If you prefer to key mappings to commands, you probably want to add something like this to your .vimrc:

nmap <silent> ;i :call GHT('issue')<CR>
nmap <silent> ;p :call GHT('pr')<CR>

Contributing

Feel free to create and tackle issues.

You can also get in touch via email :love_letter: or Twitter :bird:.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

添加新评论