TransWikia.com

How to display all buffer names in tabline?

Vi and Vim Asked on December 20, 2021

How do I display the list of all buffers in the tabline? I am using the lightline plugin, with the following settings in my .vimrc:

set showtabline=2
let g:lightline = { 'colorscheme': 'PaperColor' }
let g:lightline.tabline = {
             'left': [ [ 'tabs' ] ],
             'right': [ [ 'bufnum'] ] }
let g:lightline.separator = { 'left': '', 'right': '' }
let g:lightline.subseparator = {'left': '', 'right': '' }

I am only able to view one buffer name in the tabline at a time.

enter image description here

Swapping through the various buffers simply updates the name in the single available tab slot, like so:

enter image description here

Instead, I would like to display the buffer names simultaneously in the tabline, like the vim-buftabline plugin does here:

enter image description here

Is there anyway I can achieve this without installing additional plugins? Is this a lightline issue or a vim issue, i.e. what do I need to add to my .vimrc to solve this? I’ve scoured the docs for lightline and vim (:h setting-tabline, etc.) and couldn’t figure out how to display all the buffers.

Thanks for reading

One Answer

Try installing the lightline-bufferline plugin.

The README constains instructions on how to show buffers in lighline.

Answered by paulodiovani on December 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP