add(nvim): fugitive toggle

This commit is contained in:
Léana 江 2023-04-28 23:42:28 +02:00 committed by Léana 江
parent 978f150401
commit df60482da3
5 changed files with 32 additions and 17 deletions

View file

@ -1 +1,11 @@
vim.keymap.set('n', "<leader>G", vim.cmd.Git, { desc = "open fugitive" })
vim.keymap.set('n', "<leader>g",
":Git<CR><Down><Down><Down><Down><Down>",
{ desc = "open fugitive" }
)
vim.api.nvim_create_autocmd({ "FileType" }, {
pattern = { "fugitive" },
callback = function()
vim.keymap.set("n", "<leader>g", ":q<CR>", { desc = "close fugitive", buffer = true })
end,
})