vim-airline / vim-airline

lean & mean status/tabline for vim that's light as air
MIT License
17.78k stars 1.1k forks source link

Show help buffer in tabline #2528

Closed gerazov closed 2 years ago

gerazov commented 2 years ago

Great plugin :sunglasses:

I find the tabline very useful for navigating between buffers. Is there a way to show the help buffer (window?) in the tabline? I'm not sure it's a buffer at all (it doesn't appear in :ls).

I know there is a way to exclude stuff using:

let g:airline#extensions#tabline#excludes = ['branches']
let g:airline#extensions#tabline#ignore_bufadd_pat = '!|defx|gundo|nerd_tree|startify|tagbar|undotree|vimfiler|coc-explorer'
chrisbra commented 2 years ago

Oh, interesting. That seems to be set for me by default. Checking. Oh, it seems this changed back in 04bf4eabca8bdae8f0058e5e7e34acab6abb1554

Since I also like that behaviour, try this:

Now it should work. (For Neovim, you need to adjust the path to what neovim expects)

gerazov commented 2 years ago

Ok great - I'll give it a try :+1:

Can it be done via a autocommand on BufEnter for BufType Help or smth :sweat_smile:

I searched a lot for this and I couldn't find any results ...

chrisbra commented 2 years ago

yes, you can use a FileType autocommand, although I find the ftplugin approach much cleaner

gerazov commented 2 years ago

Ok great! I have it working with:

augroup help_as_buffer
  autocmd!
  autocmd FileType help set buflisted
augroup END

Thanks :pray:

I've also posted it here https://stackoverflow.com/a/72084068/8196612