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', '1', 'BufferGoto 1', opts) map('n', '2', 'BufferGoto 2', opts) map('n', '3', 'BufferGoto 3', opts) map('n', '4', 'BufferGoto 4', opts) map('n', '5', 'BufferGoto 5', opts) map('n', '6', 'BufferGoto 6', opts) map('n', '7', 'BufferGoto 7', opts) map('n', '8', 'BufferGoto 8', opts) map('n', '9', 'BufferGoto 9', opts) map('n', '0', 'BufferLast', opts) -- Pin/unpin buffer map('n', 'p', 'BufferPin', opts) map('n', 'i', 'BufferPick', opts) -- Close buffer map('n', 'c', 'w|BufferClose', opts) map('n', 'q', 'BufferClose!', opts) -- Wipeout buffer -- :BufferWipeout -- Close commands -- :BufferCloseAllButCurrent -- :BufferCloseAllButPinned -- :BufferCloseAllButCurrentOrPinned -- :BufferCloseBuffersLeft -- :BufferCloseBuffersRight -- Magic buffer-picking mode -- Sort automatically by... map('n', 'bb', 'BufferOrderByBufferNumber', opts) map('n', 'bd', 'BufferOrderByDirectory', opts) map('n', 'bl', 'BufferOrderByLanguage', opts) map('n', 'bw', 'BufferOrderByWindowNumber', opts) require('bufferline').setup { animation = false, icon_pinned = '', }