mirror of
https://github.com/amix/vimrc
synced 2025-07-06 16:05:01 +08:00
Update vim-gist.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
This is a vimscript for creating gists (http://gist.github.com).
|
||||
|
||||
For the latest version please see https://github.com/mattn/gist-vim.
|
||||
For the latest version please see https://github.com/mattn/vim-gist.
|
||||
|
||||
## Usage:
|
||||
|
||||
@ -87,6 +87,10 @@ For the latest version please see https://github.com/mattn/gist-vim.
|
||||
|
||||
:Gist -l mattn
|
||||
|
||||
- Specify the number of gists listed:
|
||||
|
||||
:Gist -l -n 100
|
||||
|
||||
- List everyone's gists.
|
||||
|
||||
:Gist -la
|
||||
@ -103,14 +107,14 @@ For the latest version please see https://github.com/mattn/gist-vim.
|
||||
|
||||
- Useful mappings on the gist-listing buffer:
|
||||
- Both `o` or `Enter` open the gist file in a new buffer, and close the
|
||||
gist-vim listing one.
|
||||
vim-gist listing one.
|
||||
- `b` opens the gist file in a browser; this is necessary because
|
||||
`Shift-Enter` (as was originally) only works for GUI vim.
|
||||
- `y` copies the contents of the selected gist to the clipboard, and
|
||||
closes the gist-vim buffer.
|
||||
closes the vim-gist buffer.
|
||||
- `p` pastes the contents of the selected gist to the buffer from where
|
||||
gist-vim was called, and closes the gist-vim buffer.
|
||||
- Hitting `Escape` or `Tab` at the gist-vim buffer closes it.
|
||||
vim-gist was called, and closes the vim-gist buffer.
|
||||
- Hitting `Escape` or `Tab` at the vim-gist buffer closes it.
|
||||
|
||||
- Gist listing has fixed-length columns now, more amenable to eye inspection.
|
||||
Every line on the gist-listing buffer contains the gist id, name and
|
||||
@ -188,6 +192,10 @@ You need to either set global git config:
|
||||
|
||||
$ git config --global github.user Username
|
||||
|
||||
If you want to list more than 30 gists per page (maximum is 100):
|
||||
|
||||
let g:gist_per_page_limit = 100
|
||||
|
||||
## License:
|
||||
|
||||
Copyright 2010 by Yasuhiro Matsumoto
|
||||
@ -237,7 +245,7 @@ If you want to use latest one:
|
||||
Add the following lines to your `.vimrc`.
|
||||
|
||||
Bundle 'mattn/webapi-vim'
|
||||
Bundle 'mattn/gist-vim'
|
||||
Bundle 'mattn/vim-gist'
|
||||
|
||||
Now restart Vim and run `:BundleInstall`.
|
||||
|
||||
@ -245,7 +253,7 @@ Now restart Vim and run `:BundleInstall`.
|
||||
|
||||
Add the following line to your `.vimrc`.
|
||||
|
||||
NeoBundle 'mattn/gist-vim', {'depends': 'mattn/webapi-vim'}
|
||||
NeoBundle 'mattn/vim-gist', {'depends': 'mattn/webapi-vim'}
|
||||
|
||||
## Requirements:
|
||||
|
||||
@ -262,15 +270,15 @@ First, you need to set your GitHub username in git's global configuration:
|
||||
|
||||
$ git config --global github.user <username>
|
||||
|
||||
Then gist-vim will ask for your password in order to create an access
|
||||
token. If you have two-factor authentication enabled, gist-vim will also
|
||||
Then vim-gist will ask for your password in order to create an access
|
||||
token. If you have two-factor authentication enabled, vim-gist will also
|
||||
prompt you to enter the two-factor key you receive.
|
||||
|
||||
NOTE:
|
||||
If you want you can set it directly to `g:github_user` and `g:gist_token`.
|
||||
|
||||
Whichever type of authentication you use, your GitHub password will not be
|
||||
stored, only a OAuth access token produced specifically for gist-vim. The
|
||||
stored, only a OAuth access token produced specifically for vim-gist. The
|
||||
token is stored in `~/.gist-vim`. If you stop using the plugin, you can
|
||||
easily remove this file. To revoke the associated GitHub token, go to the
|
||||
list of ["Authorized applications" on GitHub's "Account Settings"
|
||||
|
Reference in New Issue
Block a user