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