local map = vim.api.nvim_set_keymap local function n(...) map("n", ...) end local function x(...) map("x", ...) end local function i(...) map("i", ...) end local opts = { noremap = true, silent = true } -- Telescope n("", "lua require('telescope.builtin').find_files()", { noremap = true }) n("", "lua require('telescope.builtin').buffers()", { noremap = true }) n("", "lua require('telescope.builtin').lsp_code_actions()", { noremap = true }) -- Tabs n('gT', ':BufferPrevious', {}) n('gt', ':BufferNext', {}) -- Re-order to previous/next n('', ':BufferMovePrevious', opts) n('>', ' :BufferMoveNext', opts) -- Goto buffer in position... n('', ':BufferGoto 1', opts) n('', ':BufferGoto 2', opts) n('', ':BufferGoto 3', opts) n('', ':BufferGoto 4', opts) n('', ':BufferGoto 5', opts) n('', ':BufferGoto 6', opts) n('', ':BufferGoto 7', opts) n('', ':BufferGoto 8', opts) n('', ':BufferGoto 9', opts) n('', ':BufferLast', opts) -- Close buffer n('', ':BufferClose', opts) -- Wipeout buffer -- :BufferWipeout -- Close commands -- :BufferCloseAllButCurrent -- :BufferCloseBuffersLeft -- :BufferCloseBuffersRight -- Magic buffer-picking mode n('', ':BufferPick', opts) -- Code actions vim.cmd [[autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb()]] -- Tree n("", ":NvimTreeToggle", {}) -- Movement n("", "", { noremap = true }) n("", "", { noremap = true }) n("", "", { noremap = true }) n("", "", { noremap = true }) -- Tabs n("", ":tabnew", {}) -- Split n("", ":vsplit", {}) n("", ":split", {}) -- Quit n("Q", "", { noremap = true }) vim.api.nvim_exec( [[ :command WQ wq :command Wq wq :command W w :command Q q :command WQa wqa :command Wqa wqa ]], true)