Skip to content

Latest commit

 

History

History
103 lines (77 loc) · 2.47 KB

README.md

File metadata and controls

103 lines (77 loc) · 2.47 KB

BuffHunter

BuffHunter is a lightweight and highly functional Neovim plugin designed to simplify buffer management. It provides an intuitive popup list of all currently opened buffers and offers a variety of actions to help you work more efficiently.

Screenshots

image

Features

  • Interactive Buffer List: View all open buffers in a clean, easy-to-navigate popup.
  • Quick Actions:
    • Open buffers.
    • Close buffers.
    • Open buffers in horizontal or vertical splits.
  • Git Integration: Instantly check the Git status of each buffer.

Installation

Using lazy.nvim:

{
  'spiperac/buffhunter',
  config = function()
    require('buffhunter').setup {
      -- Add your configuration here
    }
  end
}

Using packer.nvim:

use {
  'spiperac/buffhunter',
  config = function()
    require('buffhunter').setup {
      -- Add your configuration here
    }
  end
}

Or you can create plugins/buffhunter.lua in your nvim config folder and use:

return function()
    require('buffhunter').setup {
      keymaps = {
        open = '<CR>',         -- Open selected buffer
        close = 'q',           -- Close selected buffer
        delete = 'x',
        split_h = 's',         -- Open in horizontal split
        split_v = 'v',         -- Open in vertical split
      },
      git_signs = true,        -- Enable Git status display
    }
end

Usage

  • Open BuffHunter: :BuffHunter
  • Perform buffer actions directly from the popup list.
  • Customize key mappings and actions through the setup function.

Additionally, you can add a keybind like:

map("n", "<C-l>", ':BuffHunter<CR>', opts)

And by pressint CTRL + L, BuffHunter popup window will showup.

Configuration

BuffHunter offers flexible configuration options. Below is an example:

Example of plugins/buffhunter.lua:

return function()
    require('buffhunter').setup {
      keymaps = {
        open = '<CR>',         -- Open selected buffer
        close = 'c',           -- Close selected buffer
        split_h = 's',         -- Open in horizontal split
        split_v = 'v',         -- Open in vertical split
      },
      git_signs = true,        -- Enable Git status display
    }
end

More options in init.lua.

License

BuffHunter is licensed under the MIT License. See LICENSE for details.