Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gw31415/bufmanager.nvim
Add a buffer listing and cleaning manager, with fuzzy find function.
https://github.com/gw31415/bufmanager.nvim
buffer fuzzy-search fzyselect-plugin neovim
Last synced: 2 days ago
JSON representation
Add a buffer listing and cleaning manager, with fuzzy find function.
- Host: GitHub
- URL: https://github.com/gw31415/bufmanager.nvim
- Owner: gw31415
- License: zlib
- Created: 2023-09-09T12:39:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-03T04:25:21.000Z (about 1 month ago)
- Last Synced: 2024-12-03T05:26:44.452Z (about 1 month ago)
- Topics: buffer, fuzzy-search, fzyselect-plugin, neovim
- Language: Vim Script
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bufmanager.nvim
Add a buffer listing and cleaning manager, with fuzzy find function.
https://github.com/gw31415/bufmanager.nvim/assets/24710985/16e76e74-184d-4c0a-a9aa-4427d74124a8
## Requirements
- [fzyselect.vim](https://github.com/gw31415/fzyselect.vim)
- Neovim## Installation
### lazy.nvim
```lua
{
"gw31415/bufmanager.nvim",
dependencies = {
"gw31415/fzyselect.vim",
config = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = "fzyselect",
callback = function()
vim.keymap.set("n", "i", "(fzyselect-fzy)", { buffer = true })
vim.keymap.set("n", "", "(fzyselect-retu)", { buffer = true })
vim.keymap.set("n", "", "clo", { buffer = true })
end,
})
end
},
event = "BufAdd",
config = function()
vim.keymap.set("n", "gb", function()
vim.api.nvim_create_autocmd("BufEnter", {
once = true,
callback = function()
vim.keymap.set({"n", "x"}, "d", "(bufmanager-bdelete)", { buffer = true })
vim.keymap.set("n", "dd", "(bufmanager-bdelete)_", { buffer = true })
end,
})
vim.fn["bufmanager#open"]()
end)
end,
}
```### dein.vim
```toml
[[plugins]]
repo = "gw31415/fzyselect.nvim"
lua_source = '''
vim.api.nvim_create_autocmd("FileType", {
pattern = "fzyselect",
callback = function()
vim.keymap.set("n", "i", "(fzyselect-fzy)", { buffer = true })
vim.keymap.set("n", "", "(fzyselect-retu)", { buffer = true })
vim.keymap.set("n", "", "clo", { buffer = true })
end,
})
'''
[[plugins]]
repo = "gw31415/bufmanager.nvim"
depends = "fzyselect.vim"
on_event = "BufAdd"
lua_source = '''
vim.keymap.set("n", "gb", function()
vim.api.nvim_create_autocmd("BufEnter", {
once = true,
callback = function()
vim.keymap.set({ "n", "x" }, "d", "(bufmanager-bdelete)", { buffer = true })
vim.keymap.set("n", "dd", "(bufmanager-bdelete)_", { buffer = true })
end,
})
vim.fn["bufmanager#open"]()
end)
'''
```## Usage
- `bufmanager#open` will display a list of buffers other than the one you are
currently in.
- They are listed in order of most recently BufEnter.- Please read the README of
[fzyselect.vim](https://github.com/gw31415/fzyselect.vim) about fuzzy search.- `(bufmanager-bdelete)` is an operator. It can delete buffers using
visual mode range selection, motion, or textobj