require("config.lazy") local map = vim.api.nvim_set_keymap local opts = {noremap = true, silent = true} -- Move to previous/next map('n', '', 'BufferPrevious', opts) map('n', '', 'BufferNext', opts) -- Re-order to previous/next map('n', '', 'BufferMovePrevious', opts) map('n', '>', 'BufferMoveNext', opts) -- Goto buffer in position... map('n', '', 'BufferGoto 1', opts) map('n', '', 'BufferGoto 2', opts) map('n', '', 'BufferGoto 3', opts) map('n', '', 'BufferGoto 4', opts) map('n', '', 'BufferGoto 5', opts) map('n', '', 'BufferGoto 6', opts) map('n', '', 'BufferGoto 7', opts) map('n', '', 'BufferGoto 8', opts) map('n', '', 'BufferGoto 9', opts) map('n', '', 'BufferLast', opts) -- Pin/unpin buffer map('n', '', 'BufferPin', opts) -- Goto pinned/unpinned buffer -- :BufferGotoPinned -- :BufferGotoUnpinned -- Close buffer map('n', '', 'BufferClose', opts) -- Wipeout buffer -- :BufferWipeout -- Close commands -- :BufferCloseAllButCurrent -- :BufferCloseAllButPinned -- :BufferCloseAllButCurrentOrPinned -- :BufferCloseBuffersLeft -- :BufferCloseBuffersRight -- Magic buffer-picking mode map('n', '', 'BufferPick', opts) -- Sort automatically by... map('n', 'bb', 'BufferOrderByBufferNumber', opts) map('n', 'bn', 'BufferOrderByName', opts) map('n', 'bd', 'BufferOrderByDirectory', opts) map('n', 'bl', 'BufferOrderByLanguage', opts) map('n', 'bw', 'BufferOrderByWindowNumber', opts) local builtin = require('telescope.builtin') vim.keymap.set('n', 'ff', builtin.find_files, { desc = 'Telescope find files' }) vim.keymap.set('n', 'fg', builtin.live_grep, { desc = 'Telescope live grep' }) vim.keymap.set('n', 'fb', builtin.buffers, { desc = 'Telescope buffers' }) vim.keymap.set('n', 'fh', builtin.help_tags, { desc = 'Telescope help tags' }) vim.keymap.set('t', '', [[]]) vim.keymap.set('t', '', [[h]]) vim.keymap.set('t', '', [[j]]) vim.keymap.set('t', '', [[k]]) vim.keymap.set('t', '', [[l]]) vim.keymap.set('i', '', [[h]]) vim.keymap.set('i', '', [[j]]) vim.keymap.set('i', '', [[k]]) vim.keymap.set('i', '', [[l]]) vim.keymap.set('n', '', [[h]]) vim.keymap.set('n', '', [[j]]) vim.keymap.set('n', '', [[k]]) vim.keymap.set('n', '', [[l]]) vim.keymap.set('n', 'v', "vsplit") vim.keymap.set('n', 'h', "split") vim.keymap.set('n', '', [[q]]) vim.keymap.set('n', '', [[+]]) vim.keymap.set('n', '', [[-]]) vim.keymap.set('n', '', [[<]]) vim.keymap.set('n', '', [[>]]) if vim.g.vscode then require "user.vscode_keymaps" else end -- Other: -- :BarbarEnable - enables barbar (enabled by default) -- :BarbarDisable - very bad command, should never be used vim.o.tabstop = 2 vim.o.shiftwidth = 2