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.
Install with your favourite package manager.
-- lazy.nvim
{
"jradam/bufcmd",
opts = { },
}
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>",
},
}
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.
- Bailey Ling for inspiring this project with vim-bufferline
- Zevv for coming up with the original idea
- Max Shen for this excellent Neovim plugin guide