mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
feat(snacks): add keymap to copy url from gitbrowse (#4870)
## Description Adds a `<leader>gY` keymap that copies the URL from `Snacks.gitbrowse()` to the clipboard. This is a feature in other git browse plugins like `vim-rhubarb`, so other people will probably be looking for this when migrating like I did. Let me know if you'd prefer a different key combination, thanks! ## Related Issue(s) N/A ## Screenshots N/A ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines.
This commit is contained in:
parent
85e4118065
commit
cdf3f1f2bd
1 changed files with 4 additions and 1 deletions
|
@ -144,7 +144,10 @@ if vim.fn.executable("lazygit") == 1 then
|
|||
end
|
||||
|
||||
map("n", "<leader>gb", function() Snacks.git.blame_line() end, { desc = "Git Blame Line" })
|
||||
map({ "n", "x" }, "<leader>gB", function() Snacks.gitbrowse() end, { desc = "Git Browse" })
|
||||
map({ "n", "x" }, "<leader>gB", function() Snacks.gitbrowse() end, { desc = "Git Browse (open)" })
|
||||
map({"n", "x" }, "<leader>gY", function()
|
||||
Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end })
|
||||
end, { desc = "Git Browse (copy)" })
|
||||
|
||||
-- quit
|
||||
map("n", "<leader>qq", "<cmd>qa<cr>", { desc = "Quit All" })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue