Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nat-418/bufala.nvim
Neovim plugin for better buffer windows
https://github.com/nat-418/bufala.nvim
Last synced: about 2 months ago
JSON representation
Neovim plugin for better buffer windows
- Host: GitHub
- URL: https://github.com/nat-418/bufala.nvim
- Owner: nat-418
- License: 0bsd
- Created: 2022-10-07T04:32:39.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-14T07:43:32.000Z (almost 2 years ago)
- Last Synced: 2023-04-29T18:53:13.603Z (over 1 year ago)
- Language: Lua
- Homepage:
- Size: 176 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bufala.nvim 🧀
==============Bufala is a simple Neovim plugin that makes working with buffer windows easier.
It pulls out the "tiling window manager for buffer windows" concept from my
[dbm.nvim](https://github.com/nat-418/dbm.nvim) plugin and refines it,
shipping only one command:* `:Bufala {subcommand} {arguments...}`
There are a few subcommands:
* `{count} cycle` moves through buffer windows with an optional count.
* `focus` swaps the current buffer window with the first or main buffer window.
* `split {direction} {target}` opens a new buffer window with an optional
direction and target. Valid directions are up, down, left, and right.
If no direction is given, Bufala will either abort or split based on
the `layout` configured in the `setup` function (see below).
The target is whatever you would put in a `:buffer {target}` command.
* `swap` swaps the current buffer window with last buffer window you were in.Installation
------------```sh
$ git clone --depth 1 https://github.com/nat-418/bufala.nvim ~/.local/share/nvim/site/pack/bufala/start/bufala.nvim
```Configuration
-------------```lua
-- ~/.config/nvim/init.lua
require('bufala').setup({
layout = 'stack' -- optional, valid values are 'stack' and 'row'
})`
```Bufala allows for the optional configuration of a default layout for windows
and splits in the `setup` function. These layouts are clones from suckless'
[dwm](https://dwm.suckless.org/). If you prefer the manual approach to
getting everything just right by placing each window individually, you
might not care to use a layout. The layouts work well for cases where you
want a more fluid, dynamic experience and not really think about where each
buffer window needs to go.Currently implemented layouts are:
* `stack`, a "portrait" optimized layout:
```
| Buffer 2
Buffer 1 +--------
| Buffer 2
```* `row`, a "landscape" optimized layout:
```
Buffer 1
---------+---------
Buffer 2 | Buffer 3
```See also
--------* [tabbot.nvim](https://github.com/nat-418/tabbot.nvim) to use tabs as something
similar to virtual desktops or workspaces.