Skip to content

MattConce/buflow.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

buflow.nvim

A buffer manager for Neovim.

Buflow automatically groups buffers based on how they were opened.

Installation

Using lazy.nvim

{
  "MattConce/buflow.nvim",
  config = function()
    require("buflow").setup({ })
  end
}

Neovim (v0.12+) built-in package manager:

vim.pack.add({
  { src = "https://github.com/MattConce/buflow.nvim.git" },
})

require("buflow").setup({ })

Default Configuration

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
  }
})

Usage

Commands

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.

Navigate

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.
  • q or <Esc>: Close the window.

About

A buffer manager for Neovim.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages