Skip to content

Commit ee0d031

Browse files
mattnvim-scripts
authored andcommitted
Version 3.7
This is an upgrade for Gist.vim: fix problem that break "gist list" window at twice.
1 parent f7ea2c0 commit ee0d031

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

plugin/gist.vim

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"=============================================================================
22
" File: gist.vim
33
" Author: Yasuhiro Matsumoto <[email protected]>
4-
" Last Change: 13-May-2010.
5-
" Version: 3.6
4+
" Last Change: 04-Jun-2010.
5+
" Version: 3.7
66
" WebPage: http://github.com/mattn/gist-vim/tree/master
77
" Usage:
88
"
@@ -179,6 +179,8 @@ function! s:GistList(user, token, gistls)
179179
exec 'silent split gist:'.a:gistls
180180
endif
181181

182+
setlocal foldmethod=manual
183+
182184
if g:gist_show_privates
183185
let password = inputsecret('Password:')
184186
if len(password) == 0
@@ -198,6 +200,9 @@ function! s:GistList(user, token, gistls)
198200
silent %d _
199201
exec 'silent r! curl -s '.url
200202
endif
203+
if exists("g:hoge")
204+
return
205+
endif
201206

202207
silent normal! ggdd
203208
silent! %s/>/>\r/g
@@ -435,7 +440,7 @@ function! s:GistPost(user, token, content, private)
435440
" find GistID: in content , then we should just update
436441
for l in split( a:content , "\n" )
437442
if l =~ '\<GistID:'
438-
let gistid = matchstr( l , '\(GistID:\s*\)\@<=[0-9]\+')
443+
let gistid = matchstr( l , 'GistID:\s*\zs\d\+')
439444

440445
if strlen(gistid) == 0
441446
echohl WarningMsg | echo "GistID error" | echohl None
@@ -446,7 +451,7 @@ function! s:GistPost(user, token, content, private)
446451
cal s:GistUpdate( a:user , a:token , a:content , gistid , '' )
447452
return
448453
elseif l =~ '\<Gist:'
449-
let gistid = matchstr( l , '\(Gist:\s*http://gist.github.com/\)\@<=[0-9]\+')
454+
let gistid = matchstr( l , 'Gist:\s*http://gist.github.com/\zs\d\+')
450455

451456
if strlen(gistid) == 0
452457
echohl WarningMsg | echo "GistID error" | echohl None

0 commit comments

Comments
 (0)