Pull request Compare This branch is 332 commits behind mattn:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
plugin
.gitignore
README.mkd
gist.vim.vimup

README.mkd

Gist.vim

This is vimscript for gist (http://gist.github.com)

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

Usage:

:Gist

post whole text to gist.

:'<,'>Gist

post selected text to gist.

:Gist -p

post whole text to gist as private. if you got empty gist list, try :Gist --abandon

:Gist -a

post whole text to gist as anonymous.

:Gist -m

post multi buffer to gist.

:Gist -e

edit the gist. (you need to have opened the gist buffer first) you can update the gist with :w command on gist buffer.

:Gist -e foo.js

edit the gist with name 'foo.js'. (you need to have opened the gist buffer first)

:Gist -d

delete the gist. (you need to have opened the gist buffer first) password authentication is needed.

:Gist -f
  fork 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 you 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.

if you want to show your private gists with ':Gist -l'

let g:gist_show_privates = 1

Requirements:

curl command (http://curl.haxx.se/) and if you want to use profile of git, it require git command.

License:

Copyright 2010 by Yasuhiro Matsumoto
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice,
   this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.

Install:

copy it to your plugin directory.

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

rtp: plugin/gist.vim cookies/github

if you want to uninstall gist.vim, you will also have to remove 'cookies/github'.