aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md2
-rw-r--r--lua/config/git-linker.lua10
2 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index 5114921..dbb4dd7 100644
--- a/README.md
+++ b/README.md
@@ -167,6 +167,8 @@ Some of the shortcuts I use frequently are listed here. In the following shortcu
| `<leader>gc` | Normal | Linux/macOS/Win | Run git commit |
| `<leader>gpl` | Normal | Linux/macOS/Win | Run git pull |
| `<leader>gpu` | Normal | Linux/macOS/Win | Run git push |
+| `<leader>gl` | Normal/Visual | Linux/macOS/Win | Get perm link for current/visually-select lines
+| `<leader>gb` | Normal | macOS | Browse current git repo in browser
| `<F9>` | Normal | Linux/macOS/Win | Compile&run current source file (for C++, LaTeX, Lua, Python) |
| `<F11>` | Normal | Linux/macOS/Win | Toggle spell checking |
| `<F12>` | Normal | Linux/macOS/Win | Toggle paste mode |
diff --git a/lua/config/git-linker.lua b/lua/config/git-linker.lua
index e2f7607..e19f0a8 100644
--- a/lua/config/git-linker.lua
+++ b/lua/config/git-linker.lua
@@ -13,3 +13,13 @@ keymap.set({ "n", "v" }, "<leader>gl", "", {
gitlinker.get_buf_range_url(mode)
end,
})
+
+keymap.set("n", "<leader>gb", "", {
+ silent = true,
+ desc = "browse repo in browser",
+ callback = function()
+ gitlinker.get_repo_url({
+ action_callback = gitlinker.actions.open_in_browser
+ })
+ end
+})