Skip to content

Commit

Permalink
Support GistURL
Browse files Browse the repository at this point in the history
  • Loading branch information
allex committed Jun 12, 2015
1 parent c39e5e3 commit 8a33cf1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autoload/gist.vim
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,12 @@ function! s:update_GistID(id) abort
call setline('.', line . ' ' . a:id)
let ret = 1
endif
if search('\<GistURL\>:\s*$')
let line = getline('.')
let line = substitute(line, '\s\+$', '', 'g')
call setline('.', line . ' https://gist.github.com/' . a:id)
let ret = 1
endif
call winrestview(view)
return ret
endfunction
Expand Down

0 comments on commit 8a33cf1

Please sign in to comment.