local opts = { noremap = true, silent = true } local map = vim.api.nvim_set_keymap map("", "", "", opts) vim.g.mapleader = " " vim.g.maplocalleader = " " -- Window Navigation without needing first map("n", "", "h", opts) map("n", "", "j", opts) map("n", "", "k", opts) map("n", "", "l", opts) -- Stay in visual mode when indenting map("v", "<", "", ">gv", opts) -- Resize with C-arrow map("n", "", "resize -2", opts) map("n", "", "resize +2", opts) map("n", "", "vertical resize -2", opts) map("n", "", "vertical resize +2", opts) -- Navigate buffers map("n", "", "bnext", opts) map("n", "", "bprevious", opts) map("n", "c", "Bdelete!", opts) -- NvimTree map('n', 'e', 'NvimTreeToggle', opts) map('n', 'o', 'NvimTreeFocus', opts) -- Comment map('n', '/', 'lua require(\'Comment.api\').toggle_current_linewise()', opts) map('v', '/', 'lua require(\'Comment.api\').toggle_linewise_op(vim.fn.visualmode())', opts) -- Telescope (See also configs/telescope.lua) map("n", "fw", "Telescope live_grep", opts) map("n", "gt", "Telescope git_status", opts) map("n", "gc", "Telescope git_commits", opts) map("n", "ff", "Telescope find_files", opts) map("n", "fb", "Telescope buffers", opts) map("n", "fh", "Telescope help_tags", opts) map("n", "fo", "Telescope oldfiles", opts) -- This isn't working for some reason