aboutsummaryrefslogtreecommitdiff
path: root/lua/core/maps.lua
blob: 57c9b94f77613e5df7b6ebb099af847d500f72df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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