mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nvim: move out fugitive bindings
This commit is contained in:
parent
67dabe91b6
commit
3352b3b6e6
2 changed files with 13 additions and 18 deletions
|
|
@ -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,
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue