This repository has been archived on 2021-04-14. You can view files and clone it, but cannot push or open issues/pull-requests.
bare-dotfiles/.config/nvim/lua/vimrc.lua

22 lines
1.0 KiB
Lua

-- Top buffer line
require'bufferline'.setup({
options = {
numbers = "ordinal",
number_style = "superscript"
}
})
-- These commands will navigate through buffers in order regardless of which mode you are using
-- e.g. if you change the order of buffers :bnext and :bprevious will not respect the custom ordering
vim.api.nvim_set_keymap('', '<F2>', ':BufferLineCyclePrev<CR>', {})
vim.api.nvim_set_keymap('', '<F3>', ':BufferLineCycleNext<CR>', {})
-- These commands will move the current buffer backwards or forwards in the bufferline
vim.api.nvim_set_keymap('', '<C-F2>', ':BufferLineMovePrev<CR>', {})
vim.api.nvim_set_keymap('', '<C-F3>', ':BufferLineMoveNext<CR>', {})
-- " These commands will sort buffers by directory, language, or a custom criteria
-- nnorevim.api.nvim_set_keymap <silent>be :BufferLineSortByExtension<CR>
-- nnorevim.api.nvim_set_keymap <silent>bd :BufferLineSortByDirectory<CR>
-- nnorevim.api.nvim_set_keymap <silent><F4> :lua require'bufferline'.sort_buffers_by(function (buf_a, buf_b) return buf_a.id < buf_b.id end)<CR>