adjust key bindings

This commit is contained in:
TheSoeren 2024-06-06 15:05:45 +02:00
parent ceee1003cc
commit 8c8f8b016c
2 changed files with 9 additions and 10 deletions

View File

@ -33,16 +33,16 @@ return {
vim.keymap.set('n', '<leader>a', function()
harpoon:list():add()
end)
vim.keymap.set('n', '<leader>1', function()
vim.keymap.set('n', '<C-h>', function()
harpoon:list():select(1)
end)
vim.keymap.set('n', '<leader>2', function()
vim.keymap.set('n', '<C-j>', function()
harpoon:list():select(2)
end)
vim.keymap.set('n', '<leader>3', function()
vim.keymap.set('n', '<C-k>', function()
harpoon:list():select(3)
end)
vim.keymap.set('n', '<leader>4', function()
vim.keymap.set('n', '<C-l>', function()
harpoon:list():select(4)
end)

View File

@ -27,13 +27,12 @@ vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
--
-- See `:help wincmd` for a list of all window commands
vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- THIS WOULD CLASH WITH HARPOON BUFFER SELECTION
-- vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' })
-- vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' })
-- vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
-- vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- Enable moving highlighted lines
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")