vim.g.mapleader = " " local keymap = vim.keymap -- for conciseness keymap.set("i", "jk", "", { desc = "Exit insert mode with jk" }) keymap.set("n", "nh", ":nohl", { desc = "Clear search highlights" }) -- increment/decrement numbers keymap.set("n", "+", "", { desc = "Increment number" }) -- increment keymap.set("n", "-", "", { desc = "Decrement number" }) -- decrement -- window management keymap.set("n", "sv", "v", { desc = "Split window vertically" }) -- split window vertically keymap.set("n", "sh", "s", { desc = "Split window horizontally" }) -- split window horizontally keymap.set("n", "se", "=", { desc = "Make splits equal size" }) -- make split windows equal width & height keymap.set("n", "sx", "close", { desc = "Close current split" }) -- close current split window keymap.set("n", "to", "tabnew", { desc = "Open new tab" }) -- open new tab keymap.set("n", "tx", "tabclose", { desc = "Close current tab" }) -- close current tab keymap.set("n", "tn", "tabn", { desc = "Go to next tab" }) -- go to next tab keymap.set("n", "tp", "tabp", { desc = "Go to previous tab" }) -- go to previous tab keymap.set("n", "tf", "tabnew %", { desc = "Open current buffer in new tab" }) -- move current buffer to new tab