Files
config-nvim/lua/config/keymaps.lua

18 lines
929 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- Keymaps are automatically loaded on the VeryLazy event
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
-- Add any additional keymaps here
--
-- movement keys (work in normal, visual, and operatorpending modes)
vim.keymap.set({ 'n', 'v', 'o' }, 'a', '<Left>', { desc = 'Move left' })
vim.keymap.set({ 'n', 'v', 'o' }, 'e', '<Down>', { desc = 'Move down' })
vim.keymap.set({ 'n', 'v', 'o' }, 'u', '<Up>', { desc = 'Move up' })
vim.keymap.set({ 'n', 'v', 'o' }, 'o', '<Right>', { desc = 'Move right' })
-- reassign original commands to freed hjkl (normal mode only)
vim.keymap.set('n', 'h', '<Cmd>normal! u<CR>', { desc = 'Undo' })
vim.keymap.set('n', 'j', '<Cmd>normal! a<CR>', { desc = 'Append' })
vim.keymap.set('n', 'k', '<Cmd>normal! e<CR>', { desc = 'End of word' })
vim.keymap.set('n', 'l', '<Cmd>normal! o<CR>', { desc = 'Open line below' })