Update navigation to use M-hjkl and M-HJKL in nvim and tmux

This commit is contained in:
Daniel McKnight 2025-07-11 09:44:14 -07:00
parent 9d92db6983
commit 96e7334928
3 changed files with 28 additions and 10 deletions

View file

@ -68,14 +68,28 @@ vim.keymap.set("n", "<leader>cx", ":CopilotChatReset<CR>", { desc = "Reset Copil
-- Configure Buffer Navigation
vim.keymap.set("n", "<A-left>", ":BufferPrevious<CR>", { desc = "Previous Buffer" })
vim.keymap.set("n", "<A-right>", ":BufferNext<CR>", { desc = "Next Buffer" })
vim.keymap.set("n", "<A-h>", ":BufferPrevious<CR>", { desc = "Previous Buffer" })
vim.keymap.set("n", "<A-l>", ":BufferNext<CR>", { desc = "Next Buffer" })
vim.keymap.set("n", "<c-h>", ":BufferPrevious<CR>", { desc = "Previous Buffer" })
vim.keymap.set("n", "<c-l>", ":BufferNext<CR>", { desc = "Next Buffer" })
vim.keymap.set("n", "<leader>bq", ":BufferClose<CR>", { desc = "Close Buffer" })
vim.keymap.set("n", "<leader>bQ", ":BufferWipeout<CR>", { desc = "Wipeout Buffer" })
vim.keymap.set("n", "<A-q>", ":BufferClose<CR>", { desc = "Close Buffer" })
vim.keymap.set("n", "<leader>bp", ":BufferPrevious<CR>", { desc = "Previous Buffer" })
vim.keymap.set("n", "<leader>bn", ":BufferNext<CR>", { desc = "Next Buffer" })
-- Configure Pane Navigation
vim.keymap.set("n", "<C-h>", "<Nop>")
vim.keymap.set("n", "<C-j>", "<Nop>")
vim.keymap.set("n", "<C-k>", "<Nop>")
vim.keymap.set("n", "<C-l>", "<Nop>")
vim.keymap.set("n", "<A-h>", ":wincmd h<CR>", { desc = "Navigate Left" })
vim.keymap.set("n", "<A-j>", ":wincmd j<CR>", { desc = "Navigate Down" })
vim.keymap.set("n", "<A-k>", ":wincmd k<CR>", { desc = "Navigate Up" })
vim.keymap.set("n", "<A-l>", ":wincmd l<CR>", { desc = "Navigate Right" })
vim.keymap.set("i", "<A-h>", ":wincmd h<CR>", { desc = "Navigate Left" })
vim.keymap.set("i", "<A-j>", ":wincmd j<CR>", { desc = "Navigate Down" })
vim.keymap.set("i", "<A-k>", ":wincmd k<CR>", { desc = "Navigate Up" })
vim.keymap.set("i", "<A-l>", ":wincmd l<CR>", { desc = "Navigate Right" })
-- Configure f-key shortcuts
vim.keymap.set("n", "<F1>", vim.lsp.buf.hover)
vim.keymap.set("i", "<F1>", vim.lsp.buf.hover)

View file

@ -4,4 +4,8 @@ return {
vim.keymap.set('n', '<c-Right>', ':TmuxNavigateRight<CR>'),
vim.keymap.set('n', '<c-Up>', ':TmuxNavigateUp<CR>'),
vim.keymap.set('n', '<c-Down>', ':TmuxNavigateDown<CR>'),
vim.keymap.set('n', '<A-h>', ':TmuxNavigateLeft<CR>'),
vim.keymap.set('n', '<A-l>', ':TmuxNavigateRight<CR>'),
vim.keymap.set('n', '<A-k>', ':TmuxNavigateUp<CR>'),
vim.keymap.set('n', '<A-j>', ':TmuxNavigateDown<CR>'),
}