-- Keymaps are automatically loaded on the VeryLazy event -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- Add any additional keymaps here -- Diagnostic keymaps vim.keymap.del("n", "") vim.keymap.del("n", "d") vim.keymap.set("n", "e", vim.diagnostic.open_float, { desc = "Show diagnostic [E]rror messages" }) vim.keymap.del("n", "qq") vim.keymap.set("n", "q", vim.diagnostic.setqflist, { desc = "Open diagnostic [Q]uickfix list" }) -- Open terminal in current window vim.keymap.del("n", "") vim.keymap.del("n", "ft") vim.keymap.del("n", "fT") vim.keymap.set({ "n", "v" }, "to", "term", { desc = "[T]erminal [O]pen" }) -- Disable arrow keys in normal mode vim.keymap.set({ "n", "v" }, "", 'echo "Use h to move!!"') vim.keymap.set({ "n", "v" }, "", 'echo "Use l to move!!"') vim.keymap.set({ "n", "v" }, "", 'echo "Use k to move!!"') vim.keymap.set({ "n", "v" }, "", 'echo "Use j to move!!"') vim.keymap.del("n", "cd") -- Populate CMD to prepare for change directory vim.keymap.set("n", "cd ", ":cd ", { desc = "Prepare CMD for [C]hange [D]irectory" }) -- Navigate to 'base' directory, the initial dir that nvim was run in vim.keymap.set( "n", "cdb", "cd " .. vim.g.base_dir .. "", { desc = "[C]hange [D]irectory to [B]ase directory" } ) -- Navigate to 'user home' directory vim.keymap.set("n", "cdh", "cd " .. vim.env.HOME .. "", { desc = "[C]hange [D]irectory to [H]ome" }) -- Automatically navigate to config directory vim.keymap.set( "n", "cdn", "cd " .. vim.fn.stdpath("config") .. "", { desc = "[C]hange [D]irectory to [N]eovim" } ) -- Resizing windows vim.keymap.set({ "n", "v" }, "", "<") vim.keymap.set({ "n", "v" }, "", ">") vim.keymap.set({ "n", "v" }, "", "+") vim.keymap.set({ "n", "v" }, "", "-") if vim.g.neovide then -- System clipboard keybinds in normal and visual mode vim.keymap.set({ "n", "v" }, "", '"+y', { desc = "Yank to System clipboard" }) vim.keymap.set({ "n", "v" }, "", '"+p', { desc = "Paste from System clipboard" }) -- Clipboard for command and insert mode vim.keymap.set({ "c", "i" }, "", "+", { desc = "Paste from System clipboard" }) -- Clipboard for terminal mode vim.keymap.set({ "t" }, "", '"+pi', { desc = "Paste from System clipboard" }) end