I use airline's tabline to show a list of my current buffers:

Plug 'vim-airline/vim-airline'
let g:airline#extensions#tabline#enabled = 1 " Use the airline tabline (replacement for buftabline)
let g:airline#extensions#tabline#show_tab_nr = 1
let g:airline#extensions#tabline#tab_nr_type = 1 " tab number
let g:airline#extensions#tabline#excludes = ['branches', 'index']
let g:airline#extensions#tabline#buffer_idx_mode = 1
nmap <a-1> <Plug>AirlineSelectTab1
nmap <a-2> <Plug>AirlineSelectTab2

airline's tabline

I really enjoy moving between my buffers in this way.

I'd like to have a terminal buffer to, which shows up in this list as normal.

However, unlike this question which complains about the opposite problem, my terminal buffer(s) don't show up in airline's tabline.

They're in ls as 32 %aR "term://.//30852:/usr/bin/zsh" line 1.

How can I get my tabline to show these buffers too?

I'm using NVIM v0.4.2.

  • 2
    airline maintainer here: Terminal buffers are excluded from the tabline as mentioned in the help github.com/vim-airline/vim-airline/blob/master/doc/… you need to customize g:airline#extensions#tabline#ignore_bufadd_pat Nov 14, 2019 at 16:09
  • Nice! Thanks so much. Is there a nice way to leave ignore_bufadd_pat as it is but remove term:// or should I just "hard-code" the remaining definitions?
    – LondonRob
    Nov 14, 2019 at 17:20
  • Seems to me you need to spell it all out. More importantly, don't you want to exclude ! ... The "!" prevents terminal buffers to appear in the tabline.
    – B Layer
    Nov 15, 2019 at 6:18
  • 1
    copy it from the help and remove the term:// for neovim or the ! for Vim Nov 15, 2019 at 6:57
  • Thanks all. Got it working. If anyone wants to write these comments up into an answer, I'll happily accept and upvote!
    – LondonRob
    Nov 15, 2019 at 11:35

1 Answer 1


Per :help airline, the default value of things airline will filter out of the buffer list if not otherwise specified by the user is:

let g:airline#extensions#tabline#ignore_bufadd_pat = '!|defx|gundo|nerd_tree|startify|tagbar|term://|undotree|vimfiler'

...where ! and term:/ are the respective ways of identifying terminals in VIM and Neovim respectively. Setting a value in your rc/init file that specifically excludes those should do the trick:

let g:airline#extensions#tabline#ignore_bufadd_pat = 'defx|gundo|nerd_tree|startify|tagbar|undotree|vimfiler'

Do note that if any excludes are later added to airline's default you would manually need to add them to your configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.