From d6d3c401928e8f3d781aa9cccc4b98bd37a84f16 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 2 Nov 2022 11:47:57 +0000 Subject: [PATCH] Add some gitsigns keymaps --- lua/config_plugins/config_gitsigns.lua | 3 +++ lua/keymaps.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/config_plugins/config_gitsigns.lua b/lua/config_plugins/config_gitsigns.lua index 3a3a2ff5..3fbe5581 100644 --- a/lua/config_plugins/config_gitsigns.lua +++ b/lua/config_plugins/config_gitsigns.lua @@ -7,6 +7,9 @@ require('gitsigns').setup{ -- Setup keymaps vim.api.nvim_buf_set_keymap(bufnr, 'n', '[g', 'Gitsigns prev_hunk', {}) vim.api.nvim_buf_set_keymap(bufnr, 'n', ']g', 'Gitsigns next_hunk', {}) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', 'Gitsigns diffthis', {}) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gq', 'Gitsigns setqflist', {}) + vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gl', 'Gitsigns setloclist', {}) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'hp', 'Gitsigns preview_hunk', {}) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'hs', 'Gitsigns stage_hunk', {}) vim.api.nvim_buf_set_keymap(bufnr, 'n', 'hr', 'Gitsigns reset_hunk', {}) diff --git a/lua/keymaps.lua b/lua/keymaps.lua index c520ea91..d5db679a 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -14,7 +14,7 @@ vim.g.mapleader=' ' -- Misc imap('jk','') nmap('sr', ':SnipRun') -nmap('g', ':G') +nmap('G', ':G') -- Telescope nmap(';', 'Telescope builtin')