nvim: move out fugitive bindings

This commit is contained in:
Primrose 2025-07-08 22:24:18 +02:00
parent 67dabe91b6
commit 3352b3b6e6
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 13 additions and 18 deletions

View file

@ -51,21 +51,3 @@ vim.keymap.set("n", "<S-Up>", "<cmd>resize +2<cr>")
vim.keymap.set("n", "<S-Down>", "<cmd>resize -2<cr>")
vim.keymap.set("n", "<S-Left>", "<cmd>vertical resize -2<cr>")
vim.keymap.set("n", "<S-Right>", "<cmd>vertical resize +2<cr>")
-------------
-- Plugins --
-------------
-- Fugitive
vim.keymap.set("n", "<leader><space>", ":Git<CR>5<Down>")
vim.keymap.set("n", "<leader>gb", ":Git blame<CR>")
vim.keymap.set("n", "<leader>gB", ":Git blame --ignore-revs-file=.git-blame-ignore-revs<CR>")
vim.api.nvim_create_autocmd("WinClosed", {
group = vim.api.nvim_create_augroup("conf_fugitive_prevwin", {}),
callback = function(args)
local win = tonumber(args.match)
if win == vim.api.nvim_get_current_win() and vim.bo.filetype == "fugitive" then
vim.cmd.wincmd("p")
end
end,
})