public
Description: vimscript for gist
Homepage: http://www.vim.org/scripts/script.php?script_id=2423
Clone URL: git://github.com/mattn/gist-vim.git
gist-vim / gist.vim.vimup
100644 162 lines (108 sloc) 4.184 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
script_name: Gist.vim
script_id: '2423'
script_type: utility
script_package: gist.vim
script_version: '3.1'
required_vim_version: '7.0'
summary: vimscript for gist
 
detailed_description: |
  This is vimscript for gist (http://gist.github.com)
 
  Usage:
 
    :Gist
      post whole text to gist.
 
    :'<,'>Gist
      post selected text to gist.
 
    :Gist -p
      post whole text to gist with private.
 
    :Gist -a
      post whole text to gist with anonymous.
 
    :Gist -m
      post multi buffer to gist.
 
    :Gist -e
      edit the gist. (shoud be work on gist buffer)
      you can update the gist with :w command on gist buffer.
 
    :Gist -e foo.js
      edit the gist with name 'foo.js'. (shoud be work on gist buffer)
 
    :Gist -d
      delete the gist. (should be work on gist buffer)
      password authentication is needed.
 
    :Gist XXXXX
      get gist XXXXX.
 
    :Gist -c XXXXX.
      get gist XXXXX and put to clipboard.
 
    :Gist -l
      list gists from mine.
 
    :Gist -la
      list gists from all.
 
  Tips:
    if set g:gist_clip_command, gist.vim will copy the gist code
      with option '-c'.
 
      # mac
      let g:gist_clip_command = 'pbcopy'
 
      # linux
      let g:gist_clip_command = 'xclip -selection clipboard'
 
      # others(cygwin?)
      let g:gist_clip_command = 'putclip'
 
    if you want to detect filetype from filename...
 
      let g:gist_detect_filetype = 1
 
    if you want to open browser after the post...
 
      let g:gist_open_browser_after_post = 1
 
    if you want to change the browser...
 
      let g:gist_browser_command = 'w3m %URL%'
 
        or
 
      let g:gist_browser_command = 'opera %URL% &'
 
      on windows, should work with your setting.
 
  Require:
    curl command (http://curl.haxx.se/)
    and if you want to use profile of git, it require git command.
 
install_details: |
  copy it to your plugin directory.
 
versions:
- '3.1': |
   This is an upgrade for Gist.vim: fix checking redirect url.
 
- '3.0': |
   This is an upgrade for Gist.vim: fix for official changes(private button name was changed).
 
- '2.9': |
   This is an upgrade for Gist.vim: fix for official changes(private button name was changed).
 
- '2.8': |
   This is an upgrade for Gist.vim: be able to post multi buffer. currently updating or showing not supported. and ':Gist -d' delete the gist.
 
- '2.7': |
   This is an upgrade for Gist.vim: be able to write the gist to local file with ':w foo.txt'.
 
- '2.6': |
   This is an upgrade for Gist.vim: fixed problem that does not work 'Gist XXXX'.
 
- '2.5': |
   This is an upgrade for Gist.vim: use existing buffer when open the list or gist.
 
- '2.4': |
   This is an upgrade for Gist.vim: show error message when no any github settings.
 
- '2.3': |
   This is an upgrade for Gist.vim: added :w BufWriteCmd for GistUpdate.
 
- '2.2': |
   This is an upgrade for Gist.vim: fixed a bug for anonymous post. and new option '-a' for anonymous post.
 
- '2.1': |
   This is an upgrade for Gist.vim: support changing gist filename.
 
- '2.0': |
   This is an upgrade for Gist.vim: bugfix for listing gists in specified user.
 
- '1.9': |
   This is an upgrade for Gist.vim: added support editing the gist. and bits bug fix.
 
- '1.8': |
   This is an upgrade for Gist.vim: added new option g:gist_open_browser_after_post/g:gist_browser_command to open posted gist.
 
- '1.7': |
   This is an upgrade for Gist.vim: now changed argument for putting clipboard as ':Gist -c XXXXX'.
 
- '1.6': |
   This is an upgrade for Gist.vim: add gist's author in gist list.
 
- '1.5': |
   This is an upgrade for Gist.vim: oops. bugfix for auto-detection.
 
- '1.4': |
   This is an upgrade for Gist.vim: bugfix for auto-detection.
 
- '1.3': |
   This is an upgrade for Gist.vim: more auto-detection for filetype.
 
- '1.2': |
   This is an upgrade for Gist.vim: added new option for detect filetype from filename.
 
- '1.1': |
   This is an upgrade for Gist.vim: calling StdinReadPost.
 
- '1.0': |
   This is an upgrade for Gist.vim: treat literal "-" as part of username.
 
- '0.9': |
   This is an upgrade for Gist.vim: added new option 'g:gist_clip_command' that copy the gist code.
 
# __END__
# vim: filetype=yaml