gh-review.vim

March 1, 2026 · View on GitHub

A Vim 9.0+ plugin for reviewing GitHub pull requests entirely within Vim.

Side-by-side diffs, review threads, code suggestions, and review submission — all driven by the gh CLI.

Also available for Neovim: gh-review.nvim.

Goal

This plugin — which is designed for the use case where you’ve already identified a specific PR or PR branch you’re ready to review — has just one single goal:

✅ provide the simplest means possible for performing a GitHub PR review within Vim

Anything beyond that is a non-goal — for example:

❌ GitHub Issues, Notifications, Discussions, or Actions/Workflows
❌ Managing labels, assignees, or requested reviewers
❌ Browsing or searching lists of PRs
❌ Merging or closing PRs

You are expected to perform those tasks using other tooling (for example, gh-dash).

Requirements

  • Vim 9.0 or later
  • gh CLI, authenticated

Installation

With Vim’s built-in package manager:

mkdir -p ~/.vim/pack/plugins/start
cd ~/.vim/pack/plugins/start
git clone https://github.com/gh-tui-tools/gh-review.vim.git

With vim-plug:

Plug 'gh-tui-tools/gh-review.vim'

Workflows

The plugin has two main workflows: A “checkout” workflow, and a “no-checkout” workflow.

Checkout workflow

Typically used by a project maintainer reviewing a contributor’s PR. The branch is checked out locally so the reviewer can make edits, commit fixes, and push directly.

:GHReview 123          " PR number (checks out the branch)
:GHReview              " auto-detect from current branch
  • The right/head diff buffer is editable — :w writes to the working tree.
  • External file changes are detected and the plugin prompts to reload.
  • git push pushes changes back to the PR branch (works for fork PRs too).

No-checkout workflow

Typically used by a non-maintainer reviewer who only needs to read the diff and leave comments.

:GHReview https://github.com/owner/repo/pull/123

When the URL refers to a different repo than the current working directory, no checkout is attempted. The right/head diff buffer is read-only, but comments, suggestions, and review submission all work normally.

Quick start

:GHReview 123           Open PR #123
<CR>                    Open a file’s side-by-side diff
]t / [t                 Jump between review threads
gt                      View a thread
K                       Preview a thread (floating popup)
gc                      Add a comment
gF                      Jump to the file (checkout only)
g?                      Show keymap help
:GHReviewSubmit         Submit a review
:GHReviewClose          Close all review buffers

Commands

CommandDescription
:GHReviewOpen a PR (auto-detect, by number, or by URL)
:GHReviewFilesToggle the changed files list
:GHReviewStartStart a pending review (optional — :GHReviewSubmit works without it)
:GHReviewSubmitSubmit a review (Comment / Approve / Request changes)
:GHReviewDiscardDiscard the pending review and all its pending comments
:GHReviewCloseClose all review buffers and reset state

Diff mappings

KeyAction
gtOpen the review thread at the cursor line
gcCreate a new comment (visual mode: multi-line)
gsCreate a suggestion (right buffer only, visual: range)
]tJump to the next review thread
[tJump to the previous review thread
KPreview the thread at cursor (floating popup)
gfToggle the files list
gFGo to file at cursor line (checkout only)
qClose the diff view
g?Show keymap help

Thread mappings

KeyAction
Ctrl-SSubmit the reply
Ctrl-RToggle resolved/unresolved
qClose the thread buffer
Ctrl-QClose the thread buffer (works in insert mode)
g?Show keymap help
Ctrl-X Ctrl-OComplete @-mention from thread participants

Signs and virtual text

SignMeaning
CTComment thread (blue)
CRResolved thread (green)
CPPending review comment (yellow)

Each sign is accompanied by virtual text at end-of-line showing the first comment’s author and a truncated body — giving at-a-glance context without opening the thread.

Comment reactions are displayed as emoji with counts after each comment body in the thread buffer and floating preview.

Prompts

All prompts (submit review, discard review, checkout, file reload) use popup_menu() and confirm() for a modern UI — no raw inputlist() or input().

Statusline

&statusline ..= '%{gh_review#Statusline()}'

Returns "" when no review is active, or a summary like PR #42 · reviewing · 4 threads.

Comparison with other plugins

gh-review.vim shares its design with gh-review.nvim, its Neovim counterpart. There does not appear to be any other existing Vim plugin for performing GitHub PR reviews — but several Neovim plugins provide PR review features.

Featuregh-review.vimgh-review.nvimghlite.nvimgh.nvimocto.nvim
PlatformVim 9.0+Neovim 0.10+Neovim 0.10+NeovimNeovim 0.10+
PR review: side-by-side diffYesYesVia diffview.nvimYesYes
PR review: comments/threadsYesYesYesYesYes
PR review: code suggestionsYesYesNoNoYes
PR review: submit reviewYesYesYesYesYes
PR review: resolve threadsYesYesNoYesYes
PR review: thread signsYes (+ virtual text)Yes (+ virtual text)As diagnosticsNoNo
Editable diff buffersYesYesNoYes (via checkout)No
External change detectionYesYesNoNoNo
Fork PR push trackingYesYesNoYesNo
PR listing/browsingNo (non-goal)No (non-goal)YesYesYes
Merge PRsNo (non-goal)No (non-goal)YesNoYes
Labels/assignees/reviewersNo (non-goal)No (non-goal)NoNoYes
GitHub IssuesNo (non-goal)No (non-goal)NoYesYes
NotificationsNo (non-goal)No (non-goal)NoYesYes
DiscussionsNo (non-goal)No (non-goal)NoNoYes
Actions/WorkflowsNo (non-goal)No (non-goal)NoNoYes
ReactionsNo (non-goal)No (non-goal)NoNoYes
Dependenciesgh CLIgh CLIgh CLIgh CLI, litee.nvimgh CLI, plenary.nvim, picker

Documentation

See :help gh-review for full documentation.

See DESIGN.md for architecture and implementation details.