Skip to content

Open the previewed file on GitHub #324

Description

@jongio

The preview panel can copy a GitHub permalink (Y) but there's no way to open the file on GitHub in a browser. Add an O keybinding that opens the current file at github.com, pinned to the current HEAD commit and anchored to the selected line range (or the top visible line).

Reuses the existing permalink builder and the browser launcher the git info panel already uses.

Acceptance criteria:

  • O in the preview opens the file's github.com blob URL for the current HEAD, with a line anchor.
  • Works only for on-disk files in a repo with a github remote; shows a clear toast otherwise.
  • Keybinding registered in the panel, the keybindings manifest, and the help overlay.
  • Unit tests cover URL building plus the no-github-remote and non-file cases.

Metadata

Metadata

Assignees

Labels

ideaFeature idea from the idea pipeline

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions