add jk in neovim for all modes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user