diff --git a/home/vim/plugin/settings/git.vim b/home/vim/plugin/settings/git.vim index 7059f01..0deba6a 100644 --- a/home/vim/plugin/settings/git.vim +++ b/home/vim/plugin/settings/git.vim @@ -47,6 +47,15 @@ gitsigns.setup({ local visual = { ["ih"] = { gitsigns.select_hunk, "Git hunk" }, + + -- Only the actual command can make use of the visual selection... + ["g"] = { + name = "Git", + p = { ":Gitsigns preview_hunk", "Preview selection" }, + r = { ":Gitsigns reset_hunk", "Restore selection" }, + s = { ":Gitsigns stage_hunk", "Stage selection" }, + u = { ":Gitsigns undo_stage_hunk", "Undo stage selection" }, + }, } wk.register(keys, { buffer = bufnr })