Debug gist-vim

I use https://github.com/mattn/gist-vim and install it as a submodule with the vim pathogen in my package directory.

I also installed

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

I can get commands like Gist -l to work fine, this command that gets the list of gists belongs to me. I can also easily view previews of other encoders with Gist -l [thegithubusername] .

But I can not post a new gist for github. When I try to publish a new text, I get the following error:

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

No useful error message is displayed. So I’m not exactly what the problem is. Is there any way to find out that my error is (not familiar with debugging vim scripts)?

Rate any suggestions!

I tried to configure again by pulling the last gist-vim, but this is the error I get: -

error setting up gist-vim credentials

+6
source share
3 answers

It seems that Github has deprecated the v2 API, where the creation of gist was done by publishing to gist.github.com, now in v3 it needs to be done via api.github.com, maybe some other differences.

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

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

+2
source

Use the new gist.vim. If you use the git command, pull the main branch. This includes some changes that violate the specifications. the new one does not use github_token. You will need to set the command to choose the main auth or oauth2. read README or :help gist-vim .

+2
source

I have the same error, installing WebAPI.vim solution solves the problem

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

+2
source

Source: https://habr.com/ru/post/911019/


All Articles