Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging gist-vim

Tags:

github

vim

gist

I am using https://github.com/mattn/gist-vim and installing it as a submodule with vim pathogen in my bundle directory.

I have also set

git config --global github.user calvinchengx
git config --global github.token [mysecrettoken]

I am able to get commands such as Gist -l working fine, with this command retrieving a list of gists belong to me. I can also preview other coders' gists with Gist -l [thegithubusername] with no problems.

But I am unable to post a new gist to github. When attempting to post a new gist, I get the following error:

Posting it to gist...
Post failed:
Press ENTER or type command to continue

There isn't any useful error message shown. So I am not exactly what the problem is. Is there a way to find out what my error is (not familiar with debugging vim scripts)?

Appreciate any suggestions!

I tried setting up again after pulling the latest gist-vim but this is the error I get:-

error setting up gist-vim credentials

like image 732
Calvin Cheng Avatar asked Mar 18 '12 04:03

Calvin Cheng


3 Answers

It seems Github has deprecated the v2 of the API where gist creation was made by posting to gist.github.com, now in v3 it has to be done through api.github.com instead, probably some other differences to.

Api docs: http://developer.github.com/v3/#authentication

Similar issue: https://github.com/defunkt/gist/issues/79

like image 157
oxy Avatar answered Sep 30 '22 13:09

oxy


Use new gist.vim. If you are using git command, pull master branch. This include some changes breaking spec. new one don't use github_token. You'll need to setup for instruction to choose basic auth or oauth2. please read README or :help gist-vim.

like image 21
mattn Avatar answered Sep 30 '22 13:09

mattn


I've got same error, install WebAPI.vim plugin solve problem

http://www.vim.org/scripts/script.php?script_id=4019

like image 45
HVNSweeting Avatar answered Sep 30 '22 13:09

HVNSweeting