olivgr/winbarbuf.nvim

github github
bars-and-lines
stars 2
issues 0
subscribers 0
forks 0
CREATED

UPDATED


winbarbuf.nvim

Filename and buffer list displayed in the winbar.

Screenshot

winbarbuf.nvim.

Features

  • Displays filename and buffers in the winbar
  • Click a buffer number to switch buffers
  • Right-click to close buffers
  • Mouse hover highlighting
  • Configurable highlights
  • No dependencies

Installation

vim-plug

Add the following to your init.vim or init.lua:

Plug 'olivgr/winbarbuf.nvim'

Then run:

:PlugInstall

Finally, add:

require("winbarbuf").setup()

lazy.nvim

{
    "olivgr/winbarbuf.nvim",
    config = function()
        require("winbarbuf").setup()
    end,
}

Configuration

require("winbarbuf").setup({
    separator = "  ",
    prefix = "b:",
    show_filename = true,
    filename_hl = "WinBar",
    current_hl = "WinBar",
    other_hl = "WinBarOther",
    hover_hl = "WinBarHover",
    right_click = "close",
    hover = true,
})

Tips

  • I like to map Ctrl-h to :bprevious and Ctrl-l to :bnext for easy buffer switching.

  • If you want to customize the colors for filename_hl, current_hl, other_hl and hover_hl, take a look at the current colors of your colorscheme by typing :highlight. That gives you a list of the currently defined groups and colors.