All Projects → matbme → JABS.nvim

matbme / JABS.nvim

Licence: GPL-3.0 license
Just Another Buffer Switcher for Neovim

Programming Languages

lua
6591 projects
Vim Script
2826 projects

Projects that are alternatives of or similar to JABS.nvim

buffer
DEPRECATED Send social updates to Twitter, Facebook, etc. through Buffer.com via Twig templates, URLs, and plugins.
Stars: ✭ 43 (-71.33%)
Mutual labels:  buffer
go-disk-buffer
This package helps to work with huge amount of data, which cannot be stored in RAM
Stars: ✭ 39 (-74%)
Mutual labels:  buffer
to-ico
Convert PNG to ICO in memory
Stars: ✭ 115 (-23.33%)
Mutual labels:  buffer
overflow
A command-line tool for exploiting stack-based buffer overflow vulnerabilities.
Stars: ✭ 66 (-56%)
Mutual labels:  buffer
biguint-format
Node.js module to format big uint numbers from a byte array or a Buffer
Stars: ✭ 16 (-89.33%)
Mutual labels:  buffer
bipbuffer
a C implementation of Simon Cooke's bipbuffer
Stars: ✭ 15 (-90%)
Mutual labels:  buffer
Flake Idgen
Flake ID generator yields k-ordered, conflict-free ids in a distributed environment in Node.js
Stars: ✭ 196 (+30.67%)
Mutual labels:  buffer
RingBuffer
Classic ringbuffer with optional Stream interface
Stars: ✭ 53 (-64.67%)
Mutual labels:  buffer
Pulse
❤️ A heart rate camera pulse detector written in Swift.
Stars: ✭ 53 (-64.67%)
Mutual labels:  buffer
zlib
Pure javascript implementation of Zlib nodejs core module.The zlib module provides compression functionality implemented using Gzip and Deflate/Inflate.
Stars: ✭ 14 (-90.67%)
Mutual labels:  buffer
WebServer
High-performance multi-threaded tcp network server in c++11
Stars: ✭ 58 (-61.33%)
Mutual labels:  buffer
RingBuffer
模仿 kfifo 实现的环形缓冲区
Stars: ✭ 64 (-57.33%)
Mutual labels:  buffer
vivid.ex
Vivid is a simple 2D rendering library written in Elixir.
Stars: ✭ 27 (-82%)
Mutual labels:  buffer
NALib
General purpose C sourcecode collection
Stars: ✭ 16 (-89.33%)
Mutual labels:  buffer
as-string-sink
An efficient dynamically sized string buffer (aka String Builder) for AssemblyScript
Stars: ✭ 23 (-84.67%)
Mutual labels:  buffer
Lwrb
Lightweight generic ring buffer manager library
Stars: ✭ 215 (+43.33%)
Mutual labels:  buffer
codec
Encode keys, values and range options, with built-in or custom encodings.
Stars: ✭ 27 (-82%)
Mutual labels:  buffer
sirdez
Glorious Binary Serialization and Deserialization for TypeScript.
Stars: ✭ 20 (-86.67%)
Mutual labels:  buffer
typedarray-to-buffer
Convert a typed array to a Buffer without a copy.
Stars: ✭ 64 (-57.33%)
Mutual labels:  buffer
node-pg-large-object
Large object support for PostgreSQL clients using the node-postgres library.
Stars: ✭ 31 (-79.33%)
Mutual labels:  buffer

JABS.nvim

Just Another Buffer Switcher is a minimal buffer switcher window for Neovim written in Lua.

How minimal? One command and one window minimal!

JABS shows exactly what you would expect to see with :buffers or :ls, but in a prettier and interactive way.

Requirements

Installation

You can install JABS with your plugin manager of choice. If you use packer.nvim, simply add to your plugin list:

use 'matbme/JABS.nvim'

Usage

As previously mentioned, JABS only has one command: :JABSOpen, which opens JABS' window.

By default, you can navigate between buffers with j and k as well as <Tab> and <S-Tab>, and jump to a buffer with <CR>. When switching buffers the window closes automatically, but it can also be closed with <Esc> or q.

You can also open a preview window for the buffer selected under the cursor with <S-p>, which by default appears above JABS' window. See below how to change its default behavior.

Configuration

All configuration happens within the setup function, which you must call inside your init.lua file even if you want to stick with the defaut values. Alternatively, you can redefine a number of parameters to tweak JABS to your liking such as the window's size, border, and placement.

A minimal configuration keeping all the defaults would look like this:

require 'jabs'.setup {}

A more complex config changing every default value would look like this:

require 'jabs'.setup {
    -- Options for the main window
    position = 'center', -- center, corner. Default corner
    width = 80, -- default 50
    height = 20, -- default 10
    border = 'single', -- none, single, double, rounded, solid, shadow, (or an array or chars). Default shadow

    offset = { -- window position offset
        top = 2, -- default 0
        bottom = 2, -- default 0
        left = 2, -- default 0
        right = 2, -- default 0
    },

    -- Options for preview window
    preview_position = 'left', -- top, bottom, left, right. Default top
    preview = {
        width = 40, -- default 70
        height = 60, -- default 30
        border = 'single', -- none, single, double, rounded, solid, shadow, (or an array or chars). Default double
    },

    -- Default highlights (must be a valid :highlight)
    highlight = {
        current = "Title", -- default StatusLine
        hidden = "StatusLineNC", -- default ModeMsg
        split = "WarningMsg", -- default StatusLine
        alternate = "StatusLine" -- default WarningMsg
    },

    -- Default symbols
    symbols = {
        current = "C", -- default 
        split = "S", -- default 
        alternate = "A", -- default 
        hidden = "H", -- default ﬘
        locked = "L", -- default 
        ro = "R", -- default 
        edited = "E", -- default 
        terminal = "T", -- default 
        default_file = "D", -- Filetype icon if not present in nvim-web-devicons. Default 
    },

    -- Keymaps
    keymap = {
        close = "<c-d>", -- Close buffer. Default D
        jump = "<space>", -- Jump to buffer. Default <cr>
        h_split = "h", -- Horizontally split buffer. Default s
        v_split = "v", -- Vertically split buffer. Default v
        preview = "p", -- Open buffer preview. Default P
    },

    -- Whether to use nvim-web-devicons next to filenames
    use_devicons = false -- true or false. Default true
}

Default Keymaps

Key Action
j or <Tab> navigate down
k or <S-Tab> navigate up
D close buffer
<CR> jump to buffer
s open buffer in horizontal split
v open buffer in vertical split
<S-p> open preview for buffer

If you don't feel like manually navigating to the buffer you want to open, you can type its number before <CR>, s, or v to quickly split or switch to it.

Symbols

Future work

JABS is in its infancy and there's still a lot to be done. Here's the currently planned features:

  • Switch to buffer by typing its number
  • Preview buffer
  • Close buffer with keymap (huge thanks to @garymjr)
  • Open buffer in split
  • Sort modes (maybe visible and alternate on top)
  • Custom keymaps (thanks, @MaxVerevkin

Suggestions are always welcome 🙂!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].