From e6ca9a511738fef502818cbd098a03d26b22690a Mon Sep 17 00:00:00 2001 From: srdusr Date: Mon, 2 Jan 2023 21:45:39 +0200 Subject: Add fugitive keybindings --- lua/user/keys.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lua/user') diff --git a/lua/user/keys.lua b/lua/user/keys.lua index 85836e0..1aa5124 100644 --- a/lua/user/keys.lua +++ b/lua/user/keys.lua @@ -95,6 +95,25 @@ map("n", "tc", ":lua require('user.utils').toggle_completion()") map("n", "gg", ":LazyGit") map("n", "tt", "ToggleTerm") +---- Fugitive git bindings +map("n", "ga", ":Git add %:p") +--map("n", "gs", ":Gstatus") +map("n", "gc", ":Gcommit -v -q") +map("n", "gt", ":Gcommit -v -q %:p") +--map("n", "gd", ":Gdiff") +map("n", "ge", ":Gedit") +--map("n", "gr", ":Gread") +map("n", "gw", ":Gwrite") +map("n", "gl", ":silent! Glog:bot copen") +--map("n", "gp", ":Ggrep") +--map("n", "gp", ":Git push") +--map("n", "gb", ":Gblame") +map("n", "gm", ":Gmove") +--map("n", "gb", ":Git branch") +--map("n", "go", ":Git checkout") +--map("n", "gps", ":Dispatch! git push") +--map("n", "gpl", ":Dispatch! git pull") + -- maps.n[""] = { "ToggleTerm", desc = "Toggle terminal" } -- maps.n["gg"] = { function() toggle_term_cmd "lazygit" end, desc = "ToggleTerm lazygit" } -- maps.n["tn"] = { function() toggle_term_cmd "node" end, desc = "ToggleTerm node" } -- cgit v1.2.3