local key = vim.keymap.set vim.g.mapleader = "," -- toggle spellcheck key("n", "l", [[:setlocal spell! spelllang=en_us]]) -- toggle cursorcolumn key("n", "c", [[:set cursorcolumn!]]) -- scroll doc with ctrl+[jk] key({ "n", "v" }, "", "") key({ "n", "v" }, "", "") -- go to begining or end of line with ctrl+[hl] key({ "n", "v" }, "", "zh") key({ "n", "v" }, "", "zl") -- split navigation with ctrl+shift+[hjkl] key("n", "", "h") key("n", "", "j") key("n", "", "k") key("n", "", "l") -- browser like tab shortcuts key("n", "", "gt") key("n", "", "gT") --key("n", "", [[:tabe]]) --key("n", "", [[:tabclose]]) -- is already used lol -- additional tab shortcuts key("n", "", "gt") key("n", "", "gT") -- copy text to x11 buffer key("", "", [["+y]]) key("", "", [["+x]]) key("", "", [["+y]]) key("", "", [["+x]]) -- unmap ex mode key("", "Q", "") -- repeat commands with visual blocks using period key("v", ".", [[:normal .]]) -- save files with root permissions with command `w!!` key("c", "w!!", [[execute 'silent! write !doas tee % >/dev/null' edit!]]) -- command mode delete entire line with ctrl+d key("c", "", [[]])