From e43a43500e3ee15e60ed1662c493ade74e1c40de Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Mon, 3 Jan 2022 21:27:13 -0800 Subject: [PATCH] Add bindings for fugitive --- neovim/lua/plugins.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/neovim/lua/plugins.lua b/neovim/lua/plugins.lua index aae92f4..9237da3 100644 --- a/neovim/lua/plugins.lua +++ b/neovim/lua/plugins.lua @@ -115,6 +115,14 @@ return require("packer").startup({ -- Adds git operations to vim use({ "tpope/vim-fugitive", + config = function() + local opts = { silent = true, noremap = true } + vim.api.nvim_set_keymap("n", "gb", "Gblame", opts) + vim.api.nvim_set_keymap("n", "gc", "Gcommit", opts) + vim.api.nvim_set_keymap("n", "gd", "Gdiff", opts) + vim.api.nvim_set_keymap("n", "gs", "Git", opts) + vim.api.nvim_set_keymap("n", "gw", "Gwrite", opts) + end, }) -- Quick toggling of Location and Quickfix lists