2019-11-16 12:40:53 -05:00
|
|
|
"=============================================================================
|
|
|
|
" File: gist.vim
|
|
|
|
" Author: Yasuhiro Matsumoto <mattn.jp@gmail.com>
|
2022-05-19 10:00:33 -04:00
|
|
|
" WebPage: http://github.com/mattn/vim-gist
|
2019-11-16 12:40:53 -05:00
|
|
|
" License: BSD
|
|
|
|
" GetLatestVimScripts: 2423 1 :AutoInstall: gist.vim
|
|
|
|
" script type: plugin
|
|
|
|
|
|
|
|
if &compatible || (exists('g:loaded_gist_vim') && g:loaded_gist_vim)
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
let g:loaded_gist_vim = 1
|
|
|
|
|
|
|
|
function! s:CompleteArgs(arg_lead,cmdline,cursor_pos)
|
2022-05-19 10:00:33 -04:00
|
|
|
return filter(copy(["-p", "-P", "-a", "-m", "-e", "-s", "-d", "+1", "-1", "-f", "-c", "-l", "-la", "-ls", "-b", "-n",
|
2019-11-16 12:40:53 -05:00
|
|
|
\ "--listall", "--liststar", "--list", "--multibuffer", "--private", "--public", "--anonymous", "--description", "--clipboard",
|
2022-05-19 10:00:33 -04:00
|
|
|
\ "--rawurl", "--delete", "--edit", "--star", "--unstar", "--fork", "--browser", "--per-page"
|
2019-11-16 12:40:53 -05:00
|
|
|
\ ]), 'stridx(v:val, a:arg_lead)==0')
|
|
|
|
endfunction
|
|
|
|
|
2022-05-19 10:00:33 -04:00
|
|
|
let g:gist_per_page_limit = get(g:, 'gist_per_page_limit', 30)
|
2019-11-16 12:40:53 -05:00
|
|
|
command! -nargs=? -range=% -bang -complete=customlist,s:CompleteArgs Gist :call gist#Gist(<count>, "<bang>", <line1>, <line2>, <f-args>)
|
|
|
|
|
|
|
|
" vim:set et:
|