.files/.config/nvim/plugin/fugitive.lua

13 lines
533 B
Lua

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,
})