home: vim: git: more visual mappings
I cannot use the functions directly, as I would need to calculate the current selections begin and end points and use them as arguments. To be investigated.
This commit is contained in:
parent
57e5def998
commit
3df2ad0f1f
|
@ -47,6 +47,15 @@ gitsigns.setup({
|
||||||
|
|
||||||
local visual = {
|
local visual = {
|
||||||
["ih"] = { gitsigns.select_hunk, "Git hunk" },
|
["ih"] = { gitsigns.select_hunk, "Git hunk" },
|
||||||
|
|
||||||
|
-- Only the actual command can make use of the visual selection...
|
||||||
|
["<leader>g"] = {
|
||||||
|
name = "Git",
|
||||||
|
p = { ":Gitsigns preview_hunk<CR>", "Preview selection" },
|
||||||
|
r = { ":Gitsigns reset_hunk<CR>", "Restore selection" },
|
||||||
|
s = { ":Gitsigns stage_hunk<CR>", "Stage selection" },
|
||||||
|
u = { ":Gitsigns undo_stage_hunk<CR>", "Undo stage selection" },
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
wk.register(keys, { buffer = bufnr })
|
wk.register(keys, { buffer = bufnr })
|
||||||
|
|
Loading…
Reference in a new issue