add jk in neovim for all modes
This commit is contained in:
parent
1ac43d5ccd
commit
57150f9014
@ -4,7 +4,7 @@
|
||||
"conform.nvim": { "branch": "master", "commit": "d28ccf945374edd9f1c34a82f6c22261dbd8ab98" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" },
|
||||
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" },
|
||||
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
|
||||
"neo-tree.nvim": { "branch": "main", "commit": "a77af2e764c5ed4038d27d1c463fa49cd4794e07" },
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user