mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nvim: fugitive toggle restore windows focus
This commit is contained in:
parent
1fd94e7979
commit
d308d2ada8
1 changed files with 8 additions and 0 deletions
|
|
@ -80,6 +80,14 @@ vim.keymap.set("n", "<leader>gh", ":diffget //3<CR>")
|
|||
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,
|
||||
})
|
||||
|
||||
-- NoNeckPain
|
||||
vim.keymap.set("n", "<leader>z", ":NoNeckPain<CR>")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue