Skip to content

Latest commit

 

History

History
85 lines (63 loc) · 2.22 KB

readme.md

File metadata and controls

85 lines (63 loc) · 2.22 KB

BufCmd

a minimal alternative to buffer lines

Lua Neovim


Alt Text


Why do I exist?

Most of the time, your command line sits around taking up a whole row without being useful. This plugin fills that dead space with your buffers, while still allowing messages to get through.

Installation

Install with your favourite package manager.

-- lazy.nvim
{
  "jradam/bufcmd",
  opts = { },
}

Options

These are the default options.

opts = {
  max_name_length = 20,
  show_extensions = false,
  compensation = 12,
  reverse_order = false,
  chars = {
    max_string = " ... ",
    left_brace = "[",
    right_brace = "]",
    modified_left = "",
    modified_right = "+",
    nameless_buffer = "-",
  },
  theme = {
    active = { fg = "", bg = "" },
    inactive = { fg = "", bg = "" },
    modified = { fg = "", bg = "" },
    active_modified = { fg = "", bg = "" },
  },
  keys = {
    next_buffer = "<Tab>",
    prev_buffer = "<S-Tab>",
    close_buffer = "<leader>x",
    close_others = "<leader>z",
    start_bufcmd = "<leader><Tab>",
    stop_bufcmd = "<leader><S-Tab>",
  },
}

Troubleshooting

If you continuously see...

Press ENTER or type command to continue

...in your command line, it means BufCmd is overflowing, and you need to set a higher 'compensation' value. You can run the included :BufCmdTest to find the exact best value for your editor.

Other buffer management tools

Credits