From c53c42350d89e9ceb97c7cf65bc7e508fbf6c6d5 Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Wed, 11 Oct 2023 11:19:13 +0200 Subject: [PATCH] Change keybindings --- init.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 8645134..ac6689f 100644 --- a/init.lua +++ b/init.lua @@ -125,6 +125,9 @@ require('lazy').setup({ }, on_attach = function(bufnr) vim.keymap.set('n', 'hp', require('gitsigns').preview_hunk, { buffer = bufnr, desc = 'Preview git hunk' }) + vim.keymap.set('n', 'gp', require('gitsigns').prev_hunk, { buffer = bufnr, desc = '[G]o to [P]revious Hunk' }) + vim.keymap.set('n', 'gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' }) + vim.keymap.set('n', 'ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' }) -- don't override the built-in and fugitive keymaps local gs = package.loaded.gitsigns @@ -679,10 +682,10 @@ vim.keymap.set('n', 'nq', 'DBUILastQueryInfo', { desc = 'Last q local mark = require('harpoon.mark') local ui = require('harpoon.ui') -vim.keymap.set('n', 'h', mark.add_file, { desc = 'Add file to harpoon'}) +vim.keymap.set('n', 'hh', mark.add_file, { desc = 'Add file to harpoon'}) vim.keymap.set('n', '', ui.toggle_quick_menu, { desc = 'Toggle harpoon quick menu'}) -vim.keymap.set('n', '', function () ui.nav_file(1) end, { desc = 'Harpoon file 1'}) +-- vim.keymap.set('n', '', function () ui.nav_file(1) end, { desc = 'Harpoon file 1'}) vim.keymap.set('n', '', function () ui.nav_file(2) end, { desc = 'Harpoon file 2'}) vim.keymap.set('n', '', function () ui.nav_file(3) end, { desc = 'Harpoon file 3'}) vim.keymap.set('n', '', function () ui.nav_file(4) end, { desc = 'Harpoon file 4'})