Skip to content

Commit fa6fac6

Browse files
committed
Better formatting of usage section
1 parent 5a995da commit fa6fac6

File tree

2 files changed

+137
-102
lines changed

2 files changed

+137
-102
lines changed

README.mkd

Lines changed: 51 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,81 +8,98 @@ For the latest version please see https://github.com/mattn/gist-vim.
88
Usage:
99
------
1010

11+
- Post current buffer to gist, using default privacy option.
12+
1113
:Gist
12-
Post current buffer to gist, using default privacy option.
1314

14-
:'<,'>Gist
15-
Post selected text to gist, using defualt privacy option.
15+
- Post selected text to gist, using defualt privacy option.
1616
This applies to all permutations listed below (except multi).
1717

18+
:'<,'>Gist
19+
20+
- Create a private gist.
21+
1822
:Gist -p
19-
Create a private gist.
2023

21-
:Gist -P
22-
Create a public gist.
24+
- Create a public gist.
2325
(Only relevant if you've set gists to be private by default.)
2426

2527
:Gist -P
26-
Post whole text to gist as public
28+
29+
- Post whole text to gist as public
2730
This is only relevant if you've set gists to be private by default;
2831
if you get an empty gist list, try ":Gist --abandon".
2932

3033
:Gist -P
31-
Post whole text to gist as public.
34+
35+
- Post whole text to gist as public.
3236
This is only relevant if you've set gists to be private by default;
3337
if you get an empty gist list, try ":Gist --abandon".
3438

39+
:Gist -P
40+
41+
- Create a gist anonymously.
42+
3543
:Gist -a
36-
Create a gist anonymously.
44+
45+
- Create a gist with all open buffers.
3746

3847
:Gist -m
39-
Create a gist with all open buffers.
4048

41-
:Gist -e
42-
Edit the gist (you need to have opened the gist buffer first).
49+
- Edit the gist (you need to have opened the gist buffer first).
4350
You can update the gist with the ":w" command within the gist buffer.
4451

45-
:Gist -e foo.js
46-
Edit the gist with name 'foo.js' (you need to have opened the gist buffer
52+
:Gist -e
53+
54+
- Edit the gist with name 'foo.js' (you need to have opened the gist buffer
4755
first).
4856

57+
:Gist -e foo.js
58+
59+
- Delete the gist (you need to have opened the gist buffer first).
60+
Password authentication is needed.
61+
4962
:Gist -d
50-
Delete the gist (you need to have opened the gist buffer first).
63+
64+
- Fork the gist (you need to have opened the gist buffer first).
5165
Password authentication is needed.
5266

5367
:Gist -f
54-
Fork the gist (you need to have opened the gist buffer first).
55-
Password authentication is needed.
5668

69+
- Get gist XXXXX.
70+
5771
:Gist XXXXX
58-
Get gist XXXXX.
72+
73+
- Get gist XXXXX and add to clipboard.
5974

6075
:Gist -c XXXXX
61-
Get gist XXXXX and add to clipboard.
76+
77+
- List your public gists.
6278

6379
:Gist -l
64-
List your public gists.
80+
81+
- List gists from user "mattn".
6582

6683
:Gist -l mattn
67-
List gists from user "mattn".
84+
85+
- List all (public and private) of your gists.
6886

6987
:Gist -la
70-
List all (public and private) of your gists.
7188

7289
Tips:
7390
-----
7491
If you set g:gist_clip_command, gist.vim will copy the gist code with option
7592
'-c'.
7693

77-
# mac
94+
- Mac:
7895

7996
let g:gist_clip_command = 'pbcopy'
8097

81-
# linux
98+
- Linux:
8299

83100
let g:gist_clip_command = 'xclip -selection clipboard'
84101

85-
# others(cygwin?)
102+
- Others (cygwin?):
86103

87104
let g:gist_clip_command = 'putclip'
88105

@@ -98,7 +115,7 @@ If you want to change the browser:
98115

99116
let g:gist_browser_command = 'w3m %URL%'
100117

101-
or
118+
or:
102119

103120
let g:gist_browser_command = 'opera %URL% &'
104121

@@ -114,21 +131,22 @@ If you get problems when creating gists try:
114131

115132
Requirements:
116133
--------
117-
- curl command (http://curl.haxx.se/)
118-
- and if you want to use your git profile, the git command-line client.
134+
135+
- curl command (http://curl.haxx.se/)
136+
- and if you want to use your git profile, the git command-line client.
119137

120138
License:
121139
--------
122140

123141
Copyright 2010 by Yasuhiro Matsumoto
124142
modification, are permitted provided that the following conditions are met:
125-
143+
126144
1. Redistributions of source code must retain the above copyright notice,
127145
this list of conditions and the following disclaimer.
128146
2. Redistributions in binary form must reproduce the above copyright notice,
129147
this list of conditions and the following disclaimer in the documentation
130148
and/or other materials provided with the distribution.
131-
149+
132150
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
133151
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
134152
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -149,9 +167,9 @@ Copy it to your plugin directory.
149167

150168
gist.vim will create a curl cookie-jar file in your runtimepath.
151169

152-
- rtp:
153-
- plugin/gist.vim
154-
- cookies/github
170+
- rtp:
171+
- plugin/gist.vim
172+
- cookies/github
155173

156174
If you want to uninstall gist.vim, remember to also remove "cookies/github".
157175

doc/gist-vim.txt

Lines changed: 86 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -13,71 +13,89 @@ For the latest version please see https://github.com/mattn/gist-vim.
1313
==============================================================================
1414
USAGE *gist-vim-usage*
1515

16-
:Gist~
17-
Post current buffer to gist, using default privacy option.
16+
- Post current buffer to gist, using default privacy option. >
1817
19-
:'<,'>Gist~
20-
Post selected text to gist, using defualt privacy option.
21-
This applies to all permutations listed below (except multi).
18+
:Gist
19+
<
20+
- Post selected text to gist, using defualt privacy option.
21+
This applies to all permutations listed below (except multi). >
2222
23-
:Gist -p~
24-
Create a private gist.
23+
:'<,'>Gist
24+
<
25+
- Create a private gist. >
2526
26-
:Gist -P~
27-
Create a public gist.
28-
(Only relevant if you've set gists to be private by default.)
27+
:Gist -p
28+
<
29+
- Create a public gist.
30+
(Only relevant if you've set gists to be private by default.) >
2931
30-
:Gist -P~
31-
Post whole text to gist as public.
32-
This is only relevant if you've set gists to be private by default;
33-
if you get an empty gist list, try ":Gist --abandon".
32+
:Gist -P
33+
<
34+
- Post whole text to gist as public.
35+
This is only relevant if you've set gists to be private by default;
36+
if you get an empty gist list, try ":Gist --abandon". >
3437
35-
:Gist -P~
36-
Post whole text to gist as public.
37-
This is only relevant if you've set gists to be private by default.
38-
If you get an empty gist list, try ":Gist --abandon".
38+
:Gist -P
39+
<
40+
- Post whole text to gist as public.
41+
This is only relevant if you've set gists to be private by default.
42+
If you get an empty gist list, try ":Gist --abandon". >
3943
40-
:Gist -a~
41-
Create a gist anonymously.
44+
:Gist -P
45+
<
46+
- Create a gist anonymously. >
4247
43-
:Gist -m~
44-
Create a gist with all open buffers.
48+
:Gist -a
49+
<
50+
- Create a gist with all open buffers. >
4551
46-
:Gist -e~
47-
Edit the gist (you need to have opened the gist buffer first).
48-
You can update the gist with the {:w} command within the gist buffer.
52+
:Gist -m
53+
<
54+
- Edit the gist (you need to have opened the gist buffer first).
55+
You can update the gist with the {:w} command within the gist buffer. >
4956
50-
:Gist -e foo.js~
51-
Edit the gist with name "foo.js" (you need to have opened the gist buffer
52-
first).
57+
:Gist -e
58+
<
59+
- Edit the gist with name "foo.js" (you need to have opened the gist buffer
60+
first). >
5361
54-
:Gist -d~
55-
Delete the gist (you need to have opened the gist buffer first).
56-
Password authentication is needed.
62+
:Gist -e foo.js
63+
<
64+
- Delete the gist (you need to have opened the gist buffer first).
65+
Password authentication is needed. >
5766
58-
:Gist -f~
59-
Fork the gist (you need to have opened the gist buffer first).
60-
Password authentication is needed.
61-
62-
:Gist XXXXX~
63-
Get gist XXXXX.
67+
:Gist -d
68+
<
69+
- Fork the gist (you need to have opened the gist buffer first).
70+
Password authentication is needed. >
6471
65-
:Gist -c XXXXX~
66-
Get gist XXXXX and add to clipboard.
72+
:Gist -f
73+
<
74+
- Get gist XXXXX. >
6775
68-
:Gist -l~
69-
List your public gists.
76+
:Gist XXXXX
77+
<
78+
- Get gist XXXXX and add to clipboard. >
7079
71-
:Gist -l mattn~
72-
List gists from user "mattn".
80+
:Gist -c XXXXX
81+
<
82+
- List your public gists. >
7383
74-
:Gist -la~
75-
List all (public and private) of your gists.
84+
:Gist -l
85+
<
86+
- List gists from user "mattn". >
87+
88+
:Gist -l mattn
89+
<
90+
- List all (public and private) of your gists. >
91+
92+
:Gist -la
93+
<
7694

7795
==============================================================================
7896
TIPS *gist-vim-tips*
7997

80-
If you set {g:gist_clip_command}, gist.vim will copy the gist code with option
98+
If you set "g:gist_clip_command", gist.vim will copy the gist code with option
8199
"-c".
82100

83101
- Mac: >
@@ -89,7 +107,6 @@ If you set {g:gist_clip_command}, gist.vim will copy the gist code with option
89107
- Others (cygwin?): >
90108
let g:gist_clip_command = 'putclip'
91109
<
92-
93110
If you want to detect filetype from the filename: >
94111
95112
let g:gist_detect_filetype = 1
@@ -114,7 +131,7 @@ If you want to show your private gists with ":Gist -l": >
114131
<
115132
If you get problems when creating gists try: >
116133
117-
:Gist --abandon
134+
:Gist --abandon
118135
<
119136

120137
==============================================================================
@@ -127,27 +144,27 @@ REQUIREMENTS *gist-vim-requirements*
127144
LICENSE *gist-vim-license*
128145

129146

130-
Copyright 2010 by Yasuhiro Matsumoto
131-
modification, are permitted provided that the following conditions are met:
132-
133-
1. Redistributions of source code must retain the above copyright notice,
134-
this list of conditions and the following disclaimer.
135-
2. Redistributions in binary form must reproduce the above copyright notice,
136-
this list of conditions and the following disclaimer in the documentation
137-
and/or other materials provided with the distribution.
138-
139-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
140-
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
141-
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
142-
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
143-
REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
144-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
145-
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
146-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
147-
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
148-
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
149-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
150-
OF THE POSSIBILITY OF SUCH DAMAGE.
147+
Copyright 2010 by Yasuhiro Matsumoto
148+
modification, are permitted provided that the following conditions are met:
149+
150+
1. Redistributions of source code must retain the above copyright notice,
151+
this list of conditions and the following disclaimer.
152+
2. Redistributions in binary form must reproduce the above copyright notice,
153+
this list of conditions and the following disclaimer in the documentation
154+
and/or other materials provided with the distribution.
155+
156+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
157+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
158+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
159+
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
160+
REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
161+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
162+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
163+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
164+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
165+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
166+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
167+
OF THE POSSIBILITY OF SUCH DAMAGE.
151168

152169
==============================================================================
153170
INSTALL *gist-vim-install*

0 commit comments

Comments
 (0)