A buffer manager for Neovim.
Buflow automatically groups buffers based on how they were opened.
Using lazy.nvim
{
"MattConce/buflow.nvim",
config = function()
require("buflow").setup({ })
end
}vim.pack.add({
{ src = "https://github.com/MattConce/buflow.nvim.git" },
})
require("buflow").setup({ })require("buflow").setup({
width = 80,
height = 20,
border = "single", -- 'single', 'double'
ui_keymaps = {
open = "<CR>", -- Open the selected buffer
delete = "dd", -- Delete the buffer under cursor
close = "q", -- Close the UI
close_esc = "<Esc>", -- Close the UI
toggle_group = "<Tab>", -- Collapse/Expand groups (in Group view)
},
commands = {
groups = "<leader>bg", -- List all groups
current = "<leader>bc", -- List buffers in current group
next = "<leader>bn", -- Go to next buffer in group
prev = "<leader>bp", -- Go to prev buffer in group
make_root = "<leader>br", -- Detach current buffer into its own group
}
})| Command | Description |
|---|---|
:BuflowGroups |
Opens a floating window listing all buffer groups. |
:BuflowCurrent |
Opens a floating window listing buffers in the current group only. |
:BuflowNext |
Cycle to the next buffer in the current group. |
:BuflowPrev |
Cycle to the previous buffer in the current group. |
:BuflowRoot |
Detaches the current buffer from its parent and makes it the root of a new group. |
When you open with (:BuflowGroups or :BuflowCurrent):
<CR>: Switch to the selected buffer in the (Buffers/Groups) window.dd: Delete the buffer in the Buffers window.<Tab>: Toggle (collapse/expand) a group in the Groups window.qor<Esc>: Close the window.