Permalink
Fetching contributors…
Cannot retrieve contributors at this time
899 lines (743 sloc) 30.3 KB
*vim-gista.txt* A plugin which helps user to manipulate gists
Version: 2.4.0
Author: Alisue <lambdalisue@hashnote.net> *vim-gista-author*
Support: Vim 7.4 and above
License: MIT license {{{
Copyright (c) 2014-2016 Alisue, hashnote.net
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
}}}
=============================================================================
CONTENTS *vim-gista-contents*
Introduction |vim-gista-introduction|
Requirement |vim-gista-requirement|
Install |vim-gista-install|
Usage |vim-gista-usage|
Authorization |vim-gista-authorization|
List |vim-gista-list|
Open |vim-gista-open|
Post |vim-gista-post|
Interface |vim-gista-interface|
Command |vim-gista-command|
Variable |vim-gista-variable|
Mapping |vim-gista-mapping|
Autocmd |vim-gista-autocmd|
Harmonic plugins |vim-gista-harmonic-plugins|
FAQ |vim-gista-faq|
==============================================================================
INTRODUCTION *vim-gista-introduction*
*vim-gista* is a plugin for manipulating Gist. It provides the following
features:
- List entries
- List gists of a lookup
- List commits of a gist
- Open a gist
- Open a file content of a gist
- Open a JSON content of a gist
- Post a gist
- Post a content of the current buffer to a new gist
- Patch a content of the current buffer to an existing gist
- Delete a gist
- Remove a file in a gist
- Delete a gist itself
- Star/Unstar a gist
- Fork a gist
==============================================================================
REQUIREMENT *vim-gista-requirement*
One of the following is required for communicating with Gist API.
- Vim compiled with |+python| (Recommended)
- cURL (http://curl.haxx.se)
- wget (https://www.gnu.org/software/wget)
To enable fast feching in |:Gista-list|, you need a Vim compiled with
|+python| or |+python3|.
Note that Vim compiled with |+python3| without cURL or wget is not supported for
now. The recommended environment is a Vim compiled with |+python| or a Vim
compiled with |+python3| with cURL or wget.
==============================================================================
INSTALL *vim-gista-install*
Use any Vim plugin manager such as dein.vim (Shougo/dein.vim) or
vim-plug (junegunn/vim-plug) to install this plugin like:
>
" vim-plug
Plug 'lambdalisue/vim-gista'
" dein.vim
call dein#add('lambdalisue/vim-gista')
" dein.vim (lazy)
call dein#add('lambdalisue/vim-gista', {
\ 'on_cmd': 'Gista',
\})
<
Or install the repository into your |runtimepath| manually.
==============================================================================
USAGE *vim-gista-usage*
------------------------------------------------------------------------------
AUTHORIZATION *vim-gista-authorization*
Note that a explicit authorization is not required when user specify user's
GitHub account to |g:gista#client#default_username|. Temporal authorization
will use that username to login GitHub API whenever users execute command (See
|vim-gista-temporal-authorization|).
If you would like to expressly login into your GitHub account, call
|:Gista-login| like:
>
:Gista login YOUR_GITHUB_USER_NAME
<
It requires your GitHub password to create a personal access token for the
first time. Once the personal access token is created, you won't need to
re-input your GitHub password until you permanently logout from GitHub API
(See |:Gista-logout|).
It automatically obtain your GitHub username if you defined that in your
.gitconfig with a command below:
>
$ git config github.user YOUR_GITHUB_USER_NAME
<
If you prefer to directly specify your GitHub username, use
|g:gista#client#default_username| or if you would like to use vim-gista as an
anonymouse mode in default, disable resolving GitHub username by specifing 0
to |g:gista#client#use_git_config_github_username|.
If you would like to login your GitHub Enterprise API, use
|gista#client#register()| function to register your API like:
>
call gista#client#register('GHE', 'https://your.ghe.api.url')
<
And specify 'GHE' to '--apiname' option like:
>
:Gista login --apiname=GHE YOUR_USER_NAME
<
If you would like to specify a default apiname, use
|g:gista#client#default_apiname|. The apiname is also used in temporal
authorization explained below (|vim-gista-temporal-authorization|).
Note that you need to call |gista#client#register()| everytime when you want to
use your GHE accout so use your |vimrc| file to call the command.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
TEMPORAL AUTHORIZATION *vim-gista-temporal-authorization*
All commands except |:Gista-login| and |:Gista-logout| support a temporal
authorization. For example, if you would like to open a private gist of your
second account, use --username option to temporary login to your second
account like:
>
:Gista --username=YOUR_SECOND_ACCOUNT open GISTID
<
If you would like to post a current content to your GHE, use '--apiname' to
temporary login to your second API like:
>
:Gista --apiname=GHE --username=YOUR_GHE_ACCOUNT post
<
If you would like to post a gist as an anonymous user, use '--anonymous' to
temporary logout from your account like:
>
:Gista --anonymous post
<
Note that --apiname, --username, and --anonymous options requires to be
specify to |:Gista| command, namely before {command}.
------------------------------------------------------------------------------
LIST *vim-gista-list*
Call |:Gista-list| to list your personal gists like:
>
:Gista list
<
It automatically fetch gists of your account or public gists when you have
not login. If you would like to list starred gists, use 'starred' like:
>
:Gista list starred
<
If you would like to list a public gists or gists of a particular user, use
'public' or a username like
>
:Gista list public
:Gista list USERNAME
<
See |:Gista-list| for detail.
If you would like to see commits of an existing gist, call |:Gista-commits|
like:
>
:Gista commits {GISTID}
<
See |:Gista-commits| for detail.
------------------------------------------------------------------------------
OPEN *vim-gista-open*
Call |:Gista-open| to open a gist like:
>
:Gista open GISTID
<
If you would like to see a JSON content of a gist, use |:Gista-json| instead
like:
>
:Gista json GISTID
<
If you would like to open a remote content of the gist, use |:Gista-browse|
like:
>
:Gista browse GISTID
<
See |:Gista-open|, |:Gista-json|, or |:Gista-browse| for detail.
vim-gista define |BufReadCmd| for a filename which start from 'gista://', mean
that you can use a |gf| mapping to open a filename like the following (hit gf
on the filenames below).
>
gista://GitHub/16414ff40d5338d93dd3/test.vim
gista://GitHub/16414ff40d5338d93dd3.json
<
------------------------------------------------------------------------------
POST *vim-gista-post*
Call |:Gista-post| to post a content of the current buffer to a new gist like:
>
:Gista post
<
If you would like to post a content of the current buffer to an existing gist,
use |:Gista-patch| like:
>
:Gista patch GISTID
<
See |:Gista-post| or |:Gista-patch| for detail.
==============================================================================
INTERFACE *vim-gista-interface*
------------------------------------------------------------------------------
COMMAND *vim-gista-command*
Note:
All commands provide -h/--help to quickly show an usage of the command.
*vim-gista-Gista*
*:Gista*
:Gista [-h/--help]
[-n/--apiname={APINAME}]
[-u/--username={USERNAME}]
[-a/--anonymous]
{command}
An entry command of vim-gista. Users can temporary login/logout with
options of this command for {command}.
See |vim-gista-temporal-authorization| for more detail.
*vim-gista-Gista-login*
*:Gista-login*
:Gista login [-h/--help] [-n/--apiname={APINAME}] {username}
Login into API of {APINAME} with {username}. If {APINAME} is omited,
a current {APINAME} or |g:gista#client#default_apiname| is used.
If {username} is omited, |g:gista#client#default_username| is used or
the username will be obtained from 'git config github.user' when
|g:gista#client#use_git_config_github_username| is 1.
All posterior commands use an user account authorized with this
command.
See |vim-gista-authorization| if you would like to use your GitHub
Enterprise API.
See |vim-gista-temporal-authorization| if you would like to temporary
login into API.
*vim-gista-Gista-logout*
*:Gista-logout*
:Gista logout [-h/--help] [-n/--apiname=APINAME]
Logout from API and use an anonymous account of {APINAME} for
posterior commands. If {APINAME} is omited, a current {APINAME} or
|g:gista#client#default_apiname| is used.
All posterior commands use an anonymous account of {APINAME}.
See |vim-gista-authorization| if you would like to use your GitHub
Enterprise API.
See |vim-gista-temporal-authorization| if you would like to temporary
logout from API.
*vim-gista-Gista-open*
*:Gista-open*
:Gista open [-h/--help] [-o/--opener={OPENER}] [--[no-]cache]
[{gistid}] [{filename}]
Open a {filename} of {gistid}. In an opened buffer, users can post
content changes with |:write| command if the current user and the
owner of the gist is equal. Otherwise the buffer is opened as
un-|modifiable| buffer.
*vim-gista-Gista-json*
*:Gista-json*
:Gista json [-h/--help] [-o/--opener={OPENER}] [--[no-]cache]
[{gistid}]
Open a JSON content of {gistid}. An opened buffer is opened as
un-|modifiable| buffer.
Note that the content of the buffer is different when |g:gista#debug|
is 1 to see a debug information.
*vim-gista-Gista-list*
*:Gista-list*
:Gista[!] list [-h/--help]
[-o/--opener={OPENER}] [--[no-]cache]
[--[no-]since[={SINCE}]]
[--[no-]python]
[{lookup}]
Open a |gista-list| window to show gists in {lookup}.
Use --[no-]cache and/or --[no-]since option to control request like:
>
:Gista list
" => Request gists only when a corresponding cahce does not exist
:Gista list --no-cache
" => Request created/updated gists since the last access
:Gista list --no-cache --since=SINCE
" => Request created/updated gists since {SINCE}
:Gista list --no-cache --no-since
" => Request entire gists
:Gista! list
" => Request entire gists (same as --no-cache --no-since)
<
Note that --since option is not supported for 'public' gists, naemly
it always request entire gists (up to 3000 gists) of 'public' when
--no-cache option is specified.
When the Vim was compiled with |+python| and/or |+python3|, an extra
option, --[no-]python, becomes available. The option stands for
enabling a Python fetcher which request pages of gists in multi-thread
technology to drastically improve the response. If you would like to
use a default fetcher, use --no-python option.
In *gista-list* window, the following content will be shown:
>
┌ API name
│ ┌ Lookup
│ │ ┌ The current mode
│ │ │
GitHub:lambdalisue | Mode: updated_at | Press ? to toggle a ma...
- 15/12/31(07:08:22) [3] test.vi... gistid:bb408da1b3fb100d6c1a
= 15/12/27(17:58:56) * [2] benchma... gistid:c84fe3e0b306a2bc8578
│ │ │ │ │ │
│ │ │ │ │ └ GistID
│ │ │ │ └ Description
│ │ │ └ The number of files
│ │ └ Is starred marker (*: starred)
│ └ A created_at/updated_at of the gist (depends on the Mode:)
└ Fetched marker (-: Unfetched, =: fetched)
<
Note that you have to fetch starred gists first to enable "Is starred
marker" like:
>
:Gista list
" => All of your gists are shown. No "Is starred marker" are shown
:Gista list starred
" => All starred gists shwon
:Gista list
" => All of your gists are shown. "Is starred marker" are shown
<
Press ? in gista-list window to see what kind of key mappings are
available.
*vim-gista-Gista-commits*
*:Gista-commits*
:Gista commits [-h/--help] [-o/--opener={OPENER}] [{gistid}]
Open a |gista-commits| window to list commits of a gist {gistid}.
In *gista-commits* window, the following content will be shown:
>
┌ API name
│ ┌ GistID
│ │
│ │
GitHub:8c0e5da60c0b5092c73f | Press ? to toggle a mapping help
= 16/01/14(16:01:02) No changes 147b6ce6bce8bbe011
= 16/01/14(10:49:51) 1 additions, 0 deletions d4120e0ea1c3c3b602
= 16/01/14(10:35:03) No changes 9662f6ca80a3e9899f
= 16/01/14(09:16:50) 6 additions, 0 deletions ae34a2ae640c52c911
│ │ │ │
│ │ │ └ Version
│ │ └ Changes status
│ └ A committed_at of the gist
└ Fetched marker (-: Unfetched, =: fetched)
<
Press ? in gista-commits window to see what kind of key mappings are
available.
*vim-gista-Gista-post*
*:Gista-post*
:Gista post [-h/--help] [-d/--description={DESCRIPTION}]
[-p/--public|-P/--private]
[-- {filenames}...]
Post content(s) to a new gist in the current API.
When {filenames} is/are specified, it post contents of
1. A buffer if {filenames} is opened (via |getline()| function)
2. A file content otherwise (via |readfile()| function)
Otherwise it post a content of the current buffer. Note that
{filenames} which is not opened and not readable will ignored.
Note that this command apply a new filename to the buffer(s) so
use |Ctrl-^| to switch to previous filename (See |alternate-file| for
detail.)
Use |:Gista-patch| instead to add/modify a content of an existing gist.
*vim-gista-Gista-patch*
*:Gista-patch*
:Gista patch [-h/--help] [-d/--description={DESCRIPTION}]
[-f/--[no-]force]
[{gistid}]
[-- {filenames}...]
Post content(s) to an existing gist in the current API.
When {filenames} is/are specified, it post contents of
1. A buffer if {filenames} is opened (via |getline()| function)
2. A file content otherwise (via |readfile()| function)
Otherwise it post a content of the current buffer. Note that
{filenames} which is not opened and not readable will ignored.
It checks if a remote content of the gist is updated or not unless
--force option is specified.
Note that this command apply a new filename to the buffer(s) so
use |Ctrl-^| to switch to previous filename (See |alternate-file| for
detail.)
Use |:Gista-post| instead to create a new gist with a content.
*vim-gista-Gista-rename*
*:Gista-rename*
:Gista rename [-h/--help] [-f/--[no-]force]
[{gistid}] [{filename}] [{new_filename}]
Rename a {filename} of a gist.
It checks if a remote content of the gist is updated unless
--force option is specified.
*vim-gista-Gista-remove*
*:Gista-remove*
:Gista remove [-h/--help] [-f/--[no-]force] [--[no-]confirm]
[{gistid}] [{filename}]
Remove a {filename} of a gist.
It checks if a remote content of the gist is updated unless
--force option is specified.
It confirm before delete if --confirm option is specified (default).
*vim-gista-Gista-delete*
*:Gista-delete*
:Gista delete [-h/--help] [-f/--[no-]force] [--[no-]confirm]
[{gistid}]
Delete a gist.
It checks if a remote content of the gist is updated unless
--force option is specified.
It confirm before delete if --confirm option is specified (default).
*vim-gista-Gista-browse*
*:Gista-browse*
:Gista browse [-h/--help]
[-e/--echo|-y/--yank]
[{gistid}] [{filename}]
Browse a remote URL of a gist {gistid} in a system default browser
unless --echo or --yank option is specified. Otherwise it echo or
yank the URL.
*vim-gista-Gista-fork*
*:Gista-fork*
:Gista fork [-h/--help] [{gistid}]
Fork a gist {gistid} to the current user in the current API.
*vim-gista-Gista-star*
*:Gista-star*
:Gista star [-h/--help] [{gistid}]
Star a gist {gistid}
*vim-gista-Gista-unstar*
*:Gista-unstar*
:Gista unstar [-h/--help] [{gistid}]
Unstar a gist {gistid}
------------------------------------------------------------------------------
VARIABLE *vim-gista-variable*
g:gista#debug *g:gista#debug*
g:gista#develop *g:gista#develop*
1 to use vim-gista in debug or develop mode.
g:gista#avars *g:gista#avars*
A special global |Dictionary| which become available only in autocmd
of vim-gista.
See |vim-gista-autocmd| for fields available in this variable.
g:gista#client#cache_dir *g:gista#client#cache_dir*
A directory path for storing caches.
Default is '~/.cache/vim-gista'
g:gista#client#default_apiname *g:gista#client#default_apiname*
A default API name used in |:Gista-login| command.
Default is 'GitHub'.
g:gista#client#default_username *g:gista#client#default_username*
A default username used in |:Gista-login| command.
Default is ''.
*g:gista#client#use_git_config_github_user*
g:gista#client#use_git_config_github_user
1 to read user's gitconfig.
This executes "git config github.user" command
and read username from the output.
Default is 1.
*g:gista#command#json#default_opener*
*g:gista#command#open#default_opener*
*g:gista#command#list#default_opener*
g:gista#command#json#default_opener
g:gista#command#open#default_opener
g:gista#command#list#default_opener
A default opener for |:Gista-json|, |:Gista-open|, or |:Gista-list|.
The default value is 'edit' for |:Gista-json| or |:Gista-open|,
'topleft 15 split' for |:Gista-list|.
*g:gista#command#list#default_lookup*
g:gista#command#list#default_lookup
A default lookup for |:Gista-list|. The value is used when no {lookup}
is specified. If the value is empty, the current username is used.
The default value is ''.
*g:gista#command#list#default_mode*
g:gista#command#list#default_mode
A default mode for |:Gista-list|.
The default value is 'updated_at'.
*g:gista#command#list#default_mapping_visibility*
g:gista#command#list#default_mapping_visibility
1 to show mapping in gista-list window when |:Gista-list| command is
executed.
The default value is 0.
*g:gista#command#list#default_entry_opener*
g:gista#command#list#default_entry_opener
A key name in |g:gista#command#list#entry_openers| used to open a
selected gist entry.
The opener is used for |<Plug>(gista-open)| or |<Plug>(gista-json)|.
The default value is 'edit'.
*g:gista#command#list#entry_openers*
g:gista#command#list#entry_openers
A dictionary of opener commands for opening entries in gista-list
window. The value of the dictionary is a |List| which first item is a
command and the second item is 0 or 1 to indicate whether focus anchor
before opening.
The default value is:
>
let g:gista#command#list#entry_openers = {
\ 'edit': ['edit', 1],
\ 'above': ['above', 1],
\ 'below': ['below', 1],
\ 'left': ['left', 1],
\ 'right': ['right', 1],
\ 'tab': ['tab', 0],
\ 'preview': ['preview', 0],
\}
<
*g:gista#command#list#enable_default_mappings*
g:gista#command#list#enable_default_mappings
1 to enable default key mappings in a gista-list window.
See |vim-gista-mapping| if you would like to assign your custom
mappings.
The default value is 1.
*g:gista#command#list#show_status_string_in_prologue*
g:gista#command#list#show_status_string_in_prologue
1 to show status string in a prologue of gista-list window.
The default value is 1.
*g:gista#command#post#default_public*
g:gista#command#post#default_public
1 to post a gist as a public gist.
The default value is 1.
*g:gista#command#post#interactive_description*
g:gista#command#post#interactive_description
1 to ask a description when user does not specify a description with
--description=DESCRIPTION option. Note that an empty description is
not allowed when |g:gista#command#post#allow_empty_description| is 0.
The default value is 1.
*g:gista#command#post#allow_empty_description*
g:gista#command#post#allow_empty_description
1 to allow an empty description. Otherwise posting will be canceled
when an empty description is specified.
The default value is 0.
*g:gista#command#browse#default_options*
*g:gista#command#delete#default_options*
*g:gista#command#fork#default_options*
*g:gista#command#json#default_options*
*g:gista#command#list#default_options*
*g:gista#command#login#default_options*
*g:gista#command#logout#default_options*
*g:gista#command#open#default_options*
*g:gista#command#patch#default_options*
*g:gista#command#post#default_options*
*g:gista#command#star#default_options*
*g:gista#command#unstar#default_options*
g:gista#command#browse#default_options
g:gista#command#delete#default_options
g:gista#command#fork#default_options
g:gista#command#json#default_options
g:gista#command#list#default_options
g:gista#command#login#default_options
g:gista#command#logout#default_options
g:gista#command#open#default_options
g:gista#command#patch#default_options
g:gista#command#post#default_options
g:gista#command#star#default_options
g:gista#command#unstar#default_options
A |Dictionary| used to extend options of each command.
See -h/--help of each command to figure out what option is available.
For example, use |g:gista#command#list#default_options| to request
updated gists always like:
>
" Always request updated gists in :Gista list
let g:gista#command#list#default_options = {
\ 'cache': 0,
\}
<
------------------------------------------------------------------------------
MAPPING *vim-gista-mapping*
gista-list or gista-commits window showed by |:Gista-list| or |:Gista-commit|
command provide the following |<Plug>| mappings.
Note that users can show the actual key mapping by
|<Plug>(gista-toggle-mapping-visibility)| which is mapped to ? in default.
*<Plug>(gista-toggle-mapping-visibility)* Toggle mapping visibility
*<Plug>(gista-quit)* Close the buffer
*<Plug>(gista-redraw)* Redraw the buffer
*<Plug>(gista-update)* Update the buffer content
*<Plug>(gista-UPDATE)* Update the buffer content without cache
(Only in gista-list)
*<Plug>(gista-next-mode)* Select next mode
(Only in gista-list)
*<Plug>(gista-prev-mode)* Select previous mode
(Only in gista-list)
*<Plug>(gista-edit)* Open a selected gist
*<Plug>(gista-edit-above)* Open a selected gist in an above window
*<Plug>(gista-edit-below)* Open a selected gist in a below window
*<Plug>(gista-edit-left)* Open a selected gist in a left window
*<Plug>(gista-edit-right)* Open a selected gist in a right window
*<Plug>(gista-edit-tab)* Open a selected gist in a next tab
*<Plug>(gista-edit-preview)* Open a selected gist in a preview window
*<Plug>(gista-json)* Open a selected gist as a json file
*<Plug>(gista-json-above)* Open a selected gist as a json file in an
above window
*<Plug>(gista-json-below)* Open a selected gist as a json file in a
below window
*<Plug>(gista-json-left)* Open a selected gist as a json file in a
left window
*<Plug>(gista-json-right)* Open a selected gist as a json file in a
right window
*<Plug>(gista-json-tab)* Open a selected gist as a json file in a
next tab
*<Plug>(gista-json-preview)* Open a selected gist as a json file in a
preview window
*<Plug>(gista-browse-open)* Browse a URL of a selected gist in a system
browser
*<Plug>(gista-browse-yank)* Yank a URL of a selected gist
*<Plug>(gista-browse-echo)* Echo a URL of a selected gist
*<Plug>(gista-rename)* Rename a file in a selected gist
(Only in gista-list)
*<Plug>(gista-RENAME)* Rename a file in a selected gist (forcedly)
(Only in gista-list)
*<Plug>(gista-remove)* Remove a file in a selected gist from the
remote
(Only in gista-list)
*<Plug>(gista-REMOVE)* Remove a file in a selected gist from the
remote (forcedly)
(Only in gista-list)
*<Plug>(gista-delete)* Delete a selected gist from the remote
(Only in gista-list)
*<Plug>(gista-DELETE)* Delete a selected gist from the remote
(forcedly)
(Only in gista-list)
*<Plug>(gista-fork)* Fork a selected gist
(Only in gista-list)
*<Plug>(gista-star)* Star a selected gist
(Only in gista-list)
*<Plug>(gista-unstar)* Unstar a selected gist
(Only in gista-list)
*<Plug>(gista-commits)* Open commits of a selected gist
(Only in gista-list)
------------------------------------------------------------------------------
AUTOCMD *vim-gista-autocmd*
vim-gista provides the following |User| |autocmd|. Developers can use
|g:gista#avars| to refer the result of the command execution during |autocmd|.
For example, a remote gist will be opened after |:Gista-post| command with the
following code:
>
function! s:on_GistaPost() abort
let gistid = g:gista#avars.gistid
execute printf('Gista browse --gistid=%s', gistid)
endfunction
augroup my-vim-gista
autocmd! *
autocmd User GistaPost call s:on_GistaPost()
augroup END
<
*GistaStatus* Called after |:Gista-status| command has proceeded.
|g:gista#avars| does not contain any fields.
*GistaLogin* Called after |:Gista-login| command has proceeded.
|g:gista#avars| contains the following fields.
'apiname' An apiname used
'username' An username used
*GistaLogout* Called after |:Gista-logout| command has proceeded.
|g:gista#avars| contains the following fields.
'apiname' An apiname used
*GistaOpen* Called after |:Gista-open| command has proceeded.
|g:gista#avars| contains the following fields.
'gist' A gist instance
'file' A file instance
'gistid' A gist ID
'filename' A filename
*GistaJson* Called after |:Gista-json| command has proceeded.
|g:gista#avars| contains the following fields.
'gist' A gist instance
'gistid' A gist ID
*GistaBrowse* Called after |:Gista-browse| command has proceeded.
|g:gista#avars| contains the following fields.
'url' A url retrived
'gist' A gist instance
'gistid' A gist ID
'filename' A filename is provided.
*GistaList* Called after |:Gista-list| command has proceeded.
|g:gista#avars| contains the following fields.
'index' An index instance
'lookup' A lookup string
*GistaListUpdate* Called after |gista-list| window has updated.
|g:gista#avars| contains equal fields to |GistaList|
*GistaCommits* Called after |:Gista-commits| command has proceeded.
|g:gista#avars| contains the following fields.
'gistid' A gist ID
'entries' Instances of gist
'commits' Instances of commit
*GistaCommitsUpdate* Called after |gista-commits| window has updated.
|g:gista#avars| contains equal fields to |GistaCommits|
*GistaPost* Called after |:Gista-post| command has proceeded.
|g:gista#avars| contains the following fields.
'gist' A gist instance
'gistid' A gist ID
'filenames' A |List| of filenames
*GistaPatch* Called after |:Gista-patch| command has proceeded.
|g:gista#avars| contains the following fields.
'gist' A gist instance
'gistid' A gist ID
'filenames' A |List| of filenames
*GistaRename* Called after |:Gista-rename| command has proceeded.
|g:gista#avars| contains the following fields.
'gist' A gist instance
'gistid' A gist ID
'filename' A filename
'new_filename' A new filename
*GistaRemove* Called after |:Gista-remove| command has proceeded.
|g:gista#avars| contains the following fields.
'gist' A gist instance
'gistid' A gist ID
'filename' A filename
*GistaDelete* Called after |:Gista-delete| command has proceeded.
|g:gista#avars| contains the following fields.
'gistid' A gist ID
*GistaFork* Called after |:Gista-fork| command has proceeded.
|g:gista#avars| contains the following fields.
'gist' A gist instance (new)
'gistid' A gist ID (source)
*GistaStar* Called after |:Gista-star| command has proceeded.
|g:gista#avars| contains the following fields.
'gistid' A gist ID
*GistaUnstar* Called after |:Gista-unstar| command has proceeded.
|g:gista#avars| contains the following fields.
'gistid' A gist ID
==============================================================================
HARMONIC PLUGINS *vim-gista-harmonic-plugins*
lambdalisue/vim-gista-unite
Allow users to use Shougo/unite.vim interface for listing.
https://github.com/lambdalisue/vim-gista-unite
https://github.com/Shougo/unite.vim
lambdalisue/vim-gista-ctrlp
Allow users to use ctrlpvim/ctrlp.vim interface for listing.
https://github.com/lambdalisue/vim-gista-ctrlp
https://github.com/ctrlpvim/ctrlp.vim
==============================================================================
FAQ *vim-gista-faq*
Q.
HTTP 502 Bad Gateway is shown in Windows
A.
Check if you are using a correct curl by
>
$ packman -Sl | grep curl
mingw32 mingw-w64-i686-curl 7.46.0-2
mingw64 mingw-w64-x86_64-curl 7.46.0-2 [installed]
msys curl 7.46.0-1 [installed]
msys libcurl 7.46.0-1 [installed]
msys libcurl-devel 7.46.0-1
msys curl is not supported. You need to install mingw64-curl
<
If both of mingw-w64-i686-curl and mingw-w64-x86_64-curl are not [installed],
vim-gista may not work correctly. So to enable vim-gista, install a correct
curl like:
>
$ packman -S mingw-w64-x86_64-curl
<
Note that you may need to add "C:\msys64\mingw64\bin" to PATH after that.
Q.
I would like to assign a personal access token directly without login
A.
Create a token vimson in 'token/{APINAME}' at |g:gista#client#cache_dir| (for
example, '~/.cache/vim-gista/token/GitHub') with the following content:
>
{ 'username': 'your personal access token' }
<
Remember that you have to enable 'gist' access to the access token.
==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl:noet