github-commit-comment.vim


Ⅰ. 插件描述

Vim Plugin for Commit Comment of GitHub

Ⅱ. 基本信息

创建日期:  2014-04-27
使用用户:  6
Github星:  39
插件作者:  moznion

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/moznion/github-commit-comment.vim

Ⅳ. 文档说明

# github-commit-comment.vim

Post and show GitHub commit comment on vim

Description

This plugin supports the following features;

  • Post commit comment by vim

    • Line comment
    • Commit comment
    • File comment
  • Show commit line comment on vim

These command work on last modified git revision of editing file and origin of remote.

Commands

GitHubLineComment [comment]

Posts commit line comment to last modified revision of editing file and current cursored line.

Without command argument

commit line comment

With command argument

commit line comment with argument

GitHubCommitComment [comment]

Posts commit comment to last modified revision of editing file.
commit comment

GitHubFileComment [comment]

Posts commit file comment to last modified revision of editing file and current file.
commit file comment

GitHubFetchCommitComment

Fetch commit comments and show line comments on Vim (insert into quickfix)
fetch commit comments

Configurations

Authentication (requires)

  1. Generate access token of GitHub at "Personal access tokens" (https://github.com/settings/applications). This plugin only requires repo permission.
  2. Please put .github_commit_comment.vim file on your home directory. And fill github access token into this file. For example;
let g:github_commit_comment_vim = {'token': '__YOUR_ACCESS_TOKEN__'}

Specify API Endpoint (optional)

Fill URL of API endpoint in .github_commit_comment.vim, like so;

let g:github_commit_comment_vim = {'api_endpoint': 'http://example.com/api/v3'}

Default API endpoint is "https://api.github.com". If you don't specify api_endpoint, this plugin use the default URL.

Sample of configuration file

let g:github_commit_comment_vim = {
      \ 'token': '__YOUR_ACCESS_TOKEN__',
      \ 'api_endpoint': 'http://example.com/api/v3'
\ }

Dependencies

Requires

Recommends

License

MIT

添加新评论