GitHub PR review keyboard shortcut

Mark file as "viewed" on GitHub PR UI when hovering and pressing 'Escape' key, or unmark with Shift+Escape

目前為 2025-10-31 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
elijahr
評價
0 0 0
版本
0.7.0
建立日期
2025-10-31
更新日期
2025-10-31
尺寸
4.0 KB
授權條款
MIT
腳本執行於

github-review-shortcut

Mark file as "viewed" on GitHub PR UI when hovering and pressing 'Escape' key, with automatic navigation for efficient code review.

Original discussion

Features

  • Toggle viewed status: Press any key while hovering over a file diff to mark it as viewed (or unmark if already viewed)
  • Automatic navigation: In large pull request mode (where GitHub shows only one file at a time), automatically navigates to the next file ('j') when marking as viewed, or previous file ('k') when unmarking
  • Smart fallback: If no file is under the cursor, automatically targets the first visible file in the viewport

Usage

  • Hover over any file diff and press any key to toggle its viewed status
  • In large pull request mode (single file visible), the script will automatically navigate:
    • Next file when marking as viewed
    • Previous file when unmarking