Skip to content

Adds :GhPrBlame, :GhPrList, :GhPrView#1

Merged
willjp merged 1 commit intomainfrom
wp/gh-pr
Nov 1, 2020
Merged

Adds :GhPrBlame, :GhPrList, :GhPrView#1
willjp merged 1 commit intomainfrom
wp/gh-pr

Conversation

@willjp
Copy link
Copy Markdown
Owner

@willjp willjp commented Nov 1, 2020

Exposes gh pr commands to vim.
Buffer mappings, and open methods are customizable.

" Configuration
" ===========

" buffers
let g:vim_github_cli_opencmd_pr_list = 'vert sb'
let g:vim_github_cli_opencmd_pr_view = 'vert sb'

" hotkeys
let g:vim_github_cli_pr_view_map = '<Enter>'
let g:vim_github_cli_pr_view_web_map = '<c-o>'


" Commands
" =========
:GhPrBlame     " display PR for line within vim (<c-o> to open in webbrowser)
:GhPrBlame -w  " display PR for line in web-browser (also wraps other `gh pr` params)

:GhPrList                     " display all PRs that changed current file
:GhPrList --since=2015/01/01  " also wraps other `git log` params
" <Enter> displays PR in vim
" <c-o> opens PR in webbrowser

:GhPrView 100     " display PR #100 in vim
:GhPrView 100 -w  " display PR #100 in webbrowser

@willjp willjp merged commit 14d8cb8 into main Nov 1, 2020
@willjp willjp deleted the wp/gh-pr branch November 1, 2020 17:15
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.

1 participant