Skip to content

Commit 3c22baa

Browse files
authored
Merge branch 'mattn:master' into master
2 parents 8a33cf1 + 34e0f0a commit 3c22baa

File tree

7 files changed

+408
-551
lines changed

7 files changed

+408
-551
lines changed

.github/FUNDING.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: mattn # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

Makefile

-11
This file was deleted.

README.md

+50-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
### Gist.vim
1+
# Gist.vim
22

33
This is a vimscript for creating gists (http://gist.github.com).
44

5-
For the latest version please see https://github.com/mattn/gist-vim.
5+
For the latest version please see https://github.com/mattn/vim-gist.
66

77
## Usage:
88

@@ -87,6 +87,10 @@ For the latest version please see https://github.com/mattn/gist-vim.
8787

8888
:Gist -l mattn
8989

90+
- Specify the number of gists listed:
91+
92+
:Gist -l -n 100
93+
9094
- List everyone's gists.
9195

9296
:Gist -la
@@ -99,6 +103,36 @@ For the latest version please see https://github.com/mattn/gist-vim.
99103

100104
:Gist -b
101105

106+
## List Feature
107+
108+
- Useful mappings on the gist-listing buffer:
109+
- Both `o` or `Enter` open the gist file in a new buffer, and close the
110+
vim-gist listing one.
111+
- `b` opens the gist file in a browser; this is necessary because
112+
`Shift-Enter` (as was originally) only works for GUI vim.
113+
- `y` copies the contents of the selected gist to the clipboard, and
114+
closes the vim-gist buffer.
115+
- `p` pastes the contents of the selected gist to the buffer from where
116+
vim-gist was called, and closes the vim-gist buffer.
117+
- Hitting `Escape` or `Tab` at the vim-gist buffer closes it.
118+
119+
- Gist listing has fixed-length columns now, more amenable to eye inspection.
120+
Every line on the gist-listing buffer contains the gist id, name and
121+
description, in that order. Columns are now padded and truncated to offer a
122+
faster browsing, in the following way:
123+
- The gist id string is fixed at 32 characters.
124+
- The length (in characters) of the name of the gist is fixed and
125+
can be set by the user using, for example:
126+
127+
`let g:gistvim_namelength = 20`
128+
129+
The default value for `gistvim_namelength` is 30. If the gist (file)name
130+
exceeds that length, it is truncated to the specified length.
131+
- Finally, the gist description is truncated in length to fit the remaining
132+
of the line, avoiding wrapped lines that mess up the table layout.
133+
- Note that the gist listing buffer now does not show the field 'code'
134+
(not sure what that did in the first place).
135+
102136
## Tips:
103137

104138
If you set g:gist_clip_command, gist.vim will copy the gist code with option
@@ -158,6 +192,10 @@ You need to either set global git config:
158192

159193
$ git config --global github.user Username
160194

195+
If you want to list more than 30 gists per page (maximum is 100):
196+
197+
let g:gist_per_page_limit = 100
198+
161199
## License:
162200

163201
Copyright 2010 by Yasuhiro Matsumoto
@@ -201,21 +239,21 @@ You need to install webapi-vim also:
201239
If you want to use latest one:
202240

203241
https://github.com/mattn/webapi-vim
204-
242+
205243
### Install with [Vundle](https://github.com/gmarik/vundle)
206244

207245
Add the following lines to your `.vimrc`.
208246

209247
Bundle 'mattn/webapi-vim'
210-
Bundle 'mattn/gist-vim'
211-
248+
Bundle 'mattn/vim-gist'
249+
212250
Now restart Vim and run `:BundleInstall`.
213251

214252
### Install with [NeoBundle](https://github.com/Shougo/neobundle.vim)
215253

216254
Add the following line to your `.vimrc`.
217255

218-
NeoBundle 'mattn/gist-vim', {'depends': 'mattn/webapi-vim'}
256+
NeoBundle 'mattn/vim-gist', {'depends': 'mattn/webapi-vim'}
219257

220258
## Requirements:
221259

@@ -232,12 +270,15 @@ First, you need to set your GitHub username in git's global configuration:
232270

233271
$ git config --global github.user <username>
234272

235-
Then gist-vim will ask for your password in order to create an access
236-
token. If you have two-factor authentication enabled, gist-vim will also
273+
Then vim-gist will ask for your password in order to create an access
274+
token. If you have two-factor authentication enabled, vim-gist will also
237275
prompt you to enter the two-factor key you receive.
238276

277+
NOTE:
278+
If you want you can set it directly to `g:github_user` and `g:gist_token`.
279+
239280
Whichever type of authentication you use, your GitHub password will not be
240-
stored, only a OAuth access token produced specifically for gist-vim. The
281+
stored, only a OAuth access token produced specifically for vim-gist. The
241282
token is stored in `~/.gist-vim`. If you stop using the plugin, you can
242283
easily remove this file. To revoke the associated GitHub token, go to the
243284
list of ["Authorized applications" on GitHub's "Account Settings"

0 commit comments

Comments
 (0)