github.com/mattn/anko@v0.1.10/misc/vim/ftplugin/anko/play.vim (about) 1 scriptencoding utf-8 2 3 function! s:play() 4 let code = join(getline(1, '$'), "\n") 5 let res = webapi#http#post("http://play-anko.appspot.com/api/play", {"code": code}) 6 if res.status == "200" 7 echo iconv(res.content, "utf-8", &encoding) 8 else 9 for line in split(res.content, "\n") 10 echohl Error | echomsg iconv(line, "utf-8", &encoding) | echohl None 11 endfor 12 endif 13 endfunction 14 15 command! -buffer PlayAnko call s:play()