Skip to content

Commit 48e8808

Browse files
mattnvim-scripts
authored andcommitted
Version 4.1: This is an upgrade for Gist.vim: fixed code cleanup.
1 parent 20a7507 commit 48e8808

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

plugin/gist.vim

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
" File: gist.vim
33
" Author: Yasuhiro Matsumoto <[email protected]>
44
" Last Change: 29-Oct-2010.
5-
" Version: 4.0
5+
" Version: 4.1
66
" WebPage: http://github.com/mattn/gist-vim
77
" License: BSD
88
" Usage:
@@ -352,9 +352,7 @@ function! s:GistUpdate(user, token, content, gistid, gistnm)
352352
unlet query
353353

354354
let file = tempname()
355-
exec 'redir! > '.file
356-
silent echo squery
357-
redir END
355+
call writefile([squery], file)
358356
echon " Updating it to gist... "
359357
let quote = &shellxquote == '"' ? "'" : '"'
360358
let url = 'http://gist.github.com/gists/'.a:gistid
@@ -515,9 +513,7 @@ function! s:GistPost(user, token, content, private)
515513
unlet query
516514

517515
let file = tempname()
518-
exec 'redir! > '.file
519-
silent echo squery
520-
redir END
516+
call writefile([squery], file)
521517
echon " Posting it to gist... "
522518
let quote = &shellxquote == '"' ? "'" : '"'
523519
let url = 'http://gist.github.com/gists'
@@ -577,9 +573,7 @@ function! s:GistPostBuffers(user, token, private)
577573
silent! exec "buffer! ".bn
578574

579575
let file = tempname()
580-
exec 'redir! > '.file
581-
silent echo squery
582-
redir END
576+
call writefile([squery], file)
583577
echo "Posting it to gist... "
584578
let quote = &shellxquote == '"' ? "'" : '"'
585579
let url = 'http://gist.github.com/gists'

0 commit comments

Comments
 (0)