require("core.commands") local toggle_terminal = require("core.lib.toggle_terminal") vim.keymap.set("n", "l", ":nohlsearch", { desc = "clear highlighted search" }) vim.keymap.set("n", "ts", [[:%s/\s\s*$//g]], { desc = "[T]rim trailing [S]pace" }) vim.keymap.set("n", "ss", ":setlocal spell!", { desc = "[S]et [S]pell" }) vim.keymap.set("n", "p", ":set paste!", { desc = "[P]aste" }) vim.keymap.set("n", "nn", ":set nonumber norelativenumber", { desc = "[N]o [N]umber removed number and relative number" }) vim.keymap.set("n", "rn", ":set number relativenumber", { desc = "[R]elative [N]umber - set relative number and absolute number" }) vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Go to previous [D]iagnostic message" }) vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Go to next [D]iagnostic message" }) vim.keymap.set("n", "e", vim.diagnostic.open_float, { desc = "Show diagnostic [E]rror messages" }) vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "Open diagnopstic [Q]uickfix list" }) -- Use to move between windows, no need for first vim.keymap.set("n", "", "", { desc = "Move focus up window" }) vim.keymap.set("n", "", "", { desc = "Move focus down window" }) vim.keymap.set("n", "", "", { desc = "Move focus left window" }) vim.keymap.set("n", "", "", { desc = "Move focus right window" }) vim.keymap.set({ "n", "t" }, "tt", toggle_terminal) vim.keymap.set("t", "", "")