mattn / gist-vim

vimscript for gist

gist-vim / gist.vim.vimup
100644 105 lines (69 sloc) 2.418 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
script_name: Gist.vim
script_id: '2423'
script_type: utility
script_package: gist.vim
script_version: '1.8'
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 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, and if you want to use profile of git, it require git command.
 
install_details: |
  copy it to your plugin directory.
 
versions:
- '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