add jk in neovim for all modes

This commit is contained in:
2025-05-07 20:00:45 +02:00
parent 1ac43d5ccd
commit 57150f9014
3 changed files with 6 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ local remap = require("utils.remap")
remap.nmap("<leader>q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" })
remap.imap("jk", "<Esc>", { desc = "Exit insert mode with jk" })
remap.cmap("jk", "<C-c>", { desc = "Exit command/search mode with jk" })
remap.nmap("<Esc>", "<cmd>nohlsearch<CR>", { desc = "Clear highlights" })
-- Prevent "x" from overriding the register

View File

@@ -32,4 +32,8 @@ function M.tmap(lhs, rhs, opts)
M.map("t", lhs, rhs, opts)
end
function M.cmap(lhs, rhs, opts)
M.map("c", lhs, rhs, opts)
end
return M