Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/numToStr/BufOnly.nvim
Lua/Neovim port of BufOnly.vim with some changes
https://github.com/numToStr/BufOnly.nvim
lua neovim neovim-plugin nvim plugin vim-plug
Last synced: 14 days ago
JSON representation
Lua/Neovim port of BufOnly.vim with some changes
- Host: GitHub
- URL: https://github.com/numToStr/BufOnly.nvim
- Owner: numToStr
- Created: 2020-10-21T09:30:21.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-05T05:35:09.000Z (over 3 years ago)
- Last Synced: 2024-10-12T22:49:36.728Z (27 days ago)
- Topics: lua, neovim, neovim-plugin, nvim, plugin, vim-plug
- Language: Lua
- Homepage:
- Size: 3.91 KB
- Stars: 35
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-neovim - numToStr/BufOnly.nvim - Lua/Neovim port of BufOnly.vim with some changes. (Utility / Cursorline)
README
> Lua/Neovim port of https://github.com/vim-scripts/BufOnly.vim with some changes
## BufOnly.nvim
Delete all the buffers except the current, not modified and modifiable buffer.
### Requirements
- Neovim 0.5
### Install
- With [packer.nvim](https://github.com/wbthomason/packer.nvim)
```lua
use { "numtostr/BufOnly.nvim", "cmd": "BufOnly" }
```- With [vim-plug](https://github.com/junegunn/vim-plug)
```vim
Plug 'numtostr/BufOnly.nvim', { 'on': 'BufOnly' }
```### Usage
```
:BufOnly
```### Options
- Delete non modifiable buffer like NERD_tree, `false` by default
```lua
vim.g.bufonly_delete_non_modifiable = true
```### Simple config
```lua
vim.fn.nvim_set_keymap('n', 'x', ':BufOnly', { noremap = true, silent = true })
```