-
-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: async support #202
Comments
@chemzqm commented on Feb 21, 2016, 5:34 AM PST:
This would require support in |
@jalcine right. but the async with only vim script is harder to implement. it's easy to use external command like below.
But job-control feature is still experimental. And remote_expr() works only on Windows or X11 environment. |
@chemzqm ""
" @public
" Create a gist
"
" POST : /gists
" Input: >
" {
" "description": "the description for this gist",
" "public": true,
" "files": {
" "file1.txt": {
" "content": "String file contents"
" }
" }
" }
" <
function! githubapi#gist#Create(desc,filename,content,public,user,password) abort
let data = {}
let data.description = a:desc
let data.public = a:public
call extend(data, {'files': {a:filename : {'content' :a:content}}})
return githubapi#util#Get('gists', " -d '" . json_encode(data) . "' -X POST -u " . a:user . ':' .a:password)
endfunction function! githubapi#util#Get(url,args) abort
let cmd = 'curl -s "' .g:githubapi_root_url . a:url . '"'
if !empty(a:args)
let cmd = cmd . a:args
endif
call githubapi#util#log('util#Get cmd : ' . cmd)
let result = join(systemlist(cmd),"\n")
return empty(result) ? result : json_decode(result)
endfunction if I run
then I can see the url of the created gist.
I get a lot of error. |
I have a slow network with github.com in China, it would be great if this plugin support async feature if possible.
Both vim and neovim could support async process now.
The text was updated successfully, but these errors were encountered: