aboutsummaryrefslogtreecommitdiff
path: root/lua/core/maps.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/core/maps.lua')
-rw-r--r--lua/core/maps.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/lua/core/maps.lua b/lua/core/maps.lua
new file mode 100644
index 0000000..57c9b94
--- /dev/null
+++ b/lua/core/maps.lua
@@ -0,0 +1,24 @@
+local maps = {
+ n = {
+ ["<Esc>"] = { "<cmd> noh <CR>", "Clear highlights" },
+ },
+
+ t = {
+ ["<C-x>"] = {
+ vim.api.nvim_replace_termcodes("<C-\\><C-N>", true, true, true),
+ "Escape terminal mode"
+ },
+ },
+
+ v = {
+ ["<"] = { "<gv", "Indent line" },
+ [">"] = { ">gv", "Indent line" },
+ },
+}
+
+
+for mode, keytab in pairs(maps) do
+ for key, fun in pairs(keytab) do
+ vim.keymap.set(mode, key, fun[1], { desc = fun[2] })
+ end
+end