ap / vim-buftabline

Forget Vim tabs – now you can have buffer tabs
http://www.vim.org/scripts/script.php?script_id=5057
MIT License
782 stars 75 forks source link

Is there a command to disable it? #60

Closed alienbogart closed 5 years ago

alienbogart commented 5 years ago

I wish to disable vim-buftabline for certain file types, but setting let g:buftabline_show = 0 have no effect. How can I do this?

ap commented 5 years ago

I’m sorry… I can’t make sense of that question? There is only and exactly one tabline, and it shows any number of buffers. How do you want it to pick one file type, and what is it supposed to do in that case…?

ap commented 5 years ago

but setting let g:buftabline_show = 0 have no effect

Sorry, the first time I somehow didn’t notice what you were saying here. Yes, the plugin has no way of monitoring the variables, and it does not re-render the tabline without Vim asking it to (which happens whenever you switch buffers etc.). So changing its configuration does not have an immediate effect. But there is a function you can call to force the plugin to re-render the tabline. This is all documented in :help buftabline-config:

Changes to any of the plugin's configuration settings at runtime will not take effect immediately unless you force an update:

:call buftabline#update(0)

So after you do your let, you have to also do this call.