Skip to content

Conversation

@Cj-bc
Copy link
Contributor

@Cj-bc Cj-bc commented Oct 21, 2018

記事投稿時に、twitter/gist連携とプライベート投稿ができるようにしました。
vimrcに各変数を設定しておくことで有効にできます。
デフォルトでは全てfalse(twitter/gistに投稿せず、パブリック投稿)です。

  • g:qiita_vim_twitter -- trueにすると、新規記事投稿時にtwitterに投稿するようになります。
  • g:qiita_vim_gist -- trueにすると、コードスニペットをgistに投げるようになります。
  • g:qiita_vim_private -- trueにすると、プライベート投稿ができるようになります。

Cj-bc added 2 commits October 21, 2018 17:36
By this commit, you can tweet your post,
upload code snipet to gist,
make the post private.
As you did on qiita.com!!

Three variables are added and used:
    * g:qiita_vim_twitter  -- toggle whether tweet or not
    * g:qiita_vim_gist     -- toggle whether post to gist or not
    * g:qiita_vim_private  -- toggle whether post is private or not
Copy link
Owner

@mattn mattn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks your PR.


function! s:api.post_item(params)
let params = deepcopy(a:params)
let params['tweet'] = exists("g:qiita_vim_twitter") ? g:qiita_vim_twitter : v:false
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let params['tweet'] = get(g:, 'qiita_vim_twitter', v:false)

and below too

\ 'title': self['title'],
\ 'tags': self['tags'],
\ 'private': v:false,
\ 'private': exists("g:qiita_vim_private") ? g:qiita_vim_private : v:false,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@Cj-bc
Copy link
Contributor Author

Cj-bc commented Oct 21, 2018

Thanks for review.
Fixed.

@mattn mattn merged commit be70321 into mattn:master Oct 23, 2018
@mattn
Copy link
Owner

mattn commented Oct 23, 2018

Thank you

@Cj-bc Cj-bc deleted the feature/add-twiiter-gist-settings branch November 14, 2018 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants