home: vim: centralise 'git'-related mappings
This commit is contained in:
parent
f34f2fc706
commit
3d6580f52b
|
@ -1,18 +0,0 @@
|
|||
lua << EOF
|
||||
local wk = require("which-key")
|
||||
|
||||
local keys = {
|
||||
d = {
|
||||
name = "Merging diff hunks",
|
||||
o = { "<cmd>diffget<CR>", "Use this buffer's change", mode="x" },
|
||||
p = { "<cmd>diffput<CR>", "Accept other buffer change", mode="x" },
|
||||
},
|
||||
["<leader>g"] = {
|
||||
name = "Git",
|
||||
l = { "<cmd>:sp<CR><C-w>T:Gllog --follow -- %:p<CR>", "Current buffer log" },
|
||||
m = { "<Plug>(git-messenger)", "Current line blame" },
|
||||
},
|
||||
}
|
||||
|
||||
wk.register(keys)
|
||||
EOF
|
|
@ -26,7 +26,10 @@ gitsigns.setup({
|
|||
b = { gitsigns.toggle_current_line_blame, "Toggle blame virtual text" },
|
||||
d = { gitsigns.diffthis, "Diff buffer" },
|
||||
D = { function() gitsigns.diffthis("~") end, "Diff buffer against last commit" },
|
||||
g = { "<cmd>Git<CR>", "Git status" },
|
||||
h = { gitsigns.toggle_deleted, "Show deleted hunks" },
|
||||
L = { "<cmd>:sp<CR><C-w>T:Gllog --follow -- %:p<CR>", "Current buffer log" },
|
||||
m = { "<Plug>(git-messenger)", "Current line blame" },
|
||||
p = { gitsigns.preview_hunk, "Preview hunk" },
|
||||
r = { gitsigns.reset_hunk, "Revert hunk" },
|
||||
R = { gitsigns.reset_buffer, "Revert buffer" },
|
||||
|
|
Loading…
Reference in a new issue