feat: add some custom keymaps
All checks were successful
Container build / container-build (push) Successful in 3m28s
All checks were successful
Container build / container-build (push) Successful in 3m28s
This commit is contained in:
23
config/nvim/config/keymaps.lua
Normal file
23
config/nvim/config/keymaps.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
-- 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
|
||||
local keymap = vim.keymap.set
|
||||
local delkeymap = vim.keymap.del
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- Better line start/end
|
||||
keymap("n", "H", "^", opts)
|
||||
keymap("n", "L", "$", opts)
|
||||
keymap("v", "H", "^", opts)
|
||||
keymap("v", "L", "$", opts)
|
||||
|
||||
-- Better escape
|
||||
keymap("n", "<ESC>", "s<ESC>:noh<CR>", opts)
|
||||
|
||||
-- Disable alt j/k to move lines
|
||||
delkeymap({ "i", "v" }, "<A-j>")
|
||||
delkeymap({ "i", "v" }, "<A-k>")
|
||||
|
||||
-- Better <ctrl> + movement
|
||||
keymap("n", "<C-d>", "<C-d>zz", opts)
|
||||
keymap("n", "<C-u>", "<C-u>zz", opts)
|
||||
@@ -1,2 +0,0 @@
|
||||
vim.keymap.set("n", "<C-d>", "<C-d>zz", { desc = "Center cursor after moving down half-page" })
|
||||
vim.keymap.set("n", "<C-u>", "<C-u>zz", { desc = "Center cursor after moving up half-page" })
|
||||
Reference in New Issue
Block a user