seblj / nvim-tabline

Tabline for neovim written in lua
MIT License
47 stars 4 forks source link

dont show in certain files #8

Closed experiacc closed 3 years ago

experiacc commented 3 years ago

How can i exclude certain filetypes like startify or dashboard from showing tabline ?

seblj commented 3 years ago

I think you should be able to do this with ftplugin. You could create a file inside ~/.config/nvim/after/ftplugin/ where the filename would be for example startify.lua or startify.vim

You could then paste these into that file:

startify.lua

vim.opt.showtabline = 0
vim.cmd([[
augroup NoTabline
au!
autocmd BufEnter <buffer> set showtabline=0
autocmd BufLeave <buffer> set showtabline=1
augroup END
]])

startify.vim

setlocal showtabline=0
augroup NoTabline
au!
autocmd BufEnter <buffer> set showtabline=0
autocmd BufLeave <buffer> set showtabline=1
augroup END

Let me know if this fixes your problem!

experiacc commented 3 years ago

Yes this actually fixed it for startify but if i open any other file from there, tabline is still not shown. I want tabline disabled only on startify and reappear on opening any file from there.

seblj commented 3 years ago

Do you want tabline to always show even if there is only one tab open?

experiacc commented 3 years ago

Yes that will do

seblj commented 3 years ago

Okay, then i think you can change set showtabline=1 to set showtabline=2

experiacc commented 3 years ago

This seems to work as i wanted. Thanks!!