barbar.nvim
barbar.nvim copied to clipboard
Feature: named tabpages
It would be awesome if you could provide a command for renaming Neovim tab pages just like bufferline's BufferLineTabRename command. It's really useful when using Neovim tabs to separate workflow based on projects instead of terminal native tabs or something like tmux.
That might also include a redesign of how tab pages are shown at the top right corner. Not sure how much of a hassle that would be, but I just thought to make this feature request regardless and leave it up to you if it's something worth considering or not.
It doesn't sound like a big change, though I don't use that feature enough to have interest in implementing it. We can leave the issue open in case someone wants to contribute it.
Could nvim_buf_set_name do this? E.g.
vim.keymap.set('n', '<Leader>br', function()
vim.ui.input(
{
prompt = 'Rename buffer',
default = vim.api.nvim_buf_get_name(0),
},
function(input)
vim.api.nvim_buf_set_name(0, input)
end
)
end)
Note I just wrote that on my phone so it might not execute, but it hopefully gets the gist across.
Edit: misread, this request is for tabpages, not buffers
edit(romgrk): s/tabs/tabpages/, line above