Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Two quick fixes so the plugin works properly (was error-ing previously) #1

Merged
merged 2 commits into from almost 2 years ago

2 participants

jnwhiteh mattn
jnwhiteh

No description provided.

mattn mattn merged commit d8b36f6 into from
mattn mattn closed this
mattn
Owner
mattn commented

Good. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 2 unique commits by 1 author.

Jul 23, 2012
jnwhiteh jnwhiteh Use webapi# for http and json d8c91a3
jnwhiteh jnwhiteh Fix trailing whitespace 6c118ac
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +4 4 ftplugin/go/playground.vim
8 ftplugin/go/playground.vim
@@ -11,12 +11,12 @@ endfunction
11 11
12 12 function! s:playground(bang)
13 13 if !executable('curl')
14   - echoerr "install curl command"
  14 + echoerr "install curl command"
15 15 return
16 16 endif
17 17 echon 'Compiling and running...'
18 18 if a:bang =~ '^!'
19   - let res = http#post('http://play.golang.org/share', join(getline(1, line('$')), "\n"))
  19 + let res = webapi#http#post('http://play.golang.org/share', join(getline(1, line('$')), "\n"))
20 20 let url = printf('http://play.golang.org/p/%s', res.content)
21 21 echo url
22 22 let browser = get(g:, 'goplayground_open_browser', '')
@@ -28,8 +28,8 @@ function! s:playground(bang)
28 28 let @+ = url
29 29 endif
30 30 else
31   - let res = http#post('http://play.golang.org/compile', {"body": join(getline(1, line('$')), "\n")})
32   - let obj = json#decode(res.content)
  31 + let res = webapi#http#post('http://play.golang.org/compile', {"body": join(getline(1, line('$')), "\n")})
  32 + let obj = webapi#json#decode(res.content)
33 33 if has_key(obj, 'compile_errors') && len(obj.compile_errors)
34 34 echohl WarningMsg | echo obj.compile_errors | echohl None
35 35 elseif has_key(obj, 'output')

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.