Git Browse Extra
git.gitbrowse opens the current file, line, or repository on its Git remote
(GitHub, GitLab, Bitbucket, sourcehut) in your browser, using Snacks gitbrowse.
Enable it
Section titled “Enable it”-- ~/.config/blak/lua/blak/user.luareturn { extras = { enabled = { "git.gitbrowse", }, },}Or enable it interactively:
:BlakExtras enable git.gitbrowseWhat it adds
Section titled “What it adds”| Surface | Contribution |
|---|---|
| Keymap | <leader>gB opens the current file/line on the remote (normal and visual) |
Snacks already ships with Blak, so this extra adds no plugin spec — it binds a
keymap to Snacks.gitbrowse(). In visual mode the selected line range is used,
so the URL points at exactly those lines. The keymap appears in :BlakKeys.
The core git blame mapping stays on <leader>gb; this extra uses the
uppercase <leader>gB for “browse”.
Configure it
Section titled “Configure it”Snacks gitbrowse options go under snacks.gitbrowse. For example, to open a
permalink (pinned to the current commit) instead of the branch URL:
return { extras = { enabled = { "git.gitbrowse" } }, snacks = { gitbrowse = { what = "permalink", }, },}Disable it
Section titled “Disable it”Remove "git.gitbrowse" from extras.enabled or run
:BlakExtras disable git.gitbrowse, then restart Blak.