Skip to content

willjp/vim-github-cli

Repository files navigation

vim-github-cli

Exposes some github-cli functionality within vim.

  1. Install github-cli for your OS (ex: sudo pacman -S github-cli)
  2. Associate github-cli to your account (ex: gh auth login)
  3. Install plugin (vundle, pathogen, rtp)

More details in :help vim-github-cli .

" Display PR that changed line under cursor
" (within buffer, <c-o> opens in webbrowser)
:GhPrBlame

" Supports `gh pr` params
:GhPrBlame -w
:GhPrBlame -R <repo>
" Display all PRs that touched file
" (within buffer, <Enter> shows PR in vim, <c-o> opens in webbrowser)
:GhPrList

" Also supports `git log` params
:GhPrList --since=2015/01/01
:GhPrList -n 10
:GhPrView 100     " display PR #100 in vim
:GhPrView 100 -w  " display PR #100 in webbrowser
" 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>'

Tests are written using vader.vim . Run tests using ./run-tests (see --help param for options). Alternatively, install the wonderful vim-test and run them vim.

About

Exposes some github-cli functionality within vim.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published