local function rekey(t, key, command)
vim.api.nvim_set_keymap(t, key, command, { noremap = true })
end
local function remap(t, key, command)
vim.api.nvim_set_keymap(t, key, command, { noremap = false })
function rekey_normal(key, command)
rekey('n', key, command)
function rekey_input(key, command)
rekey('i', key, command)
function rekey_visual(key, command)
rekey('v', key, command)
function rekey_terminal(key, command)
rekey('t', key, command)
function remap_normal(key, command)
remap('n', key, command)
function remap_input(key, command)
remap('i', key, command)
function remap_visual(key, command)
remap('v', key, command)
function remap_terminal(key, command)
remap('t', key, command)