Hide tabline when number of tabs is lower than two #845
Unanswered
simonmandlik
asked this question in
Q&A
Replies: 2 comments 5 replies
-
Maybe you can do something like this vim.api.nvim_create_autocmd({ "TabNew", "TabClosed" }, {
group = vim.api.nvim_create_augroup("LualineTab", {}),
callback = function()
local show = #vim.api.nvim_list_tabpages() > 1
vim.o.showtabline = show and 1 or 0
require("lualine").hide({
place = { "tabline" },
unhide = show,
})
end,
}) The problem is, how to hide the tabline on the first launch? |
Beta Was this translation helpful? Give feedback.
4 replies
-
Here it is: Lines 433 to 435 in 0a5a668 {
'tabs',
cond = function() return 2 <= #vim.api.nvim_list_tabpages() end,
}, Using this does the trick on my side. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
in neovim 0.7 (and the latest version of lualine), this stopped working for me
Judging by #395, I'm not alone, but since the issue is closed, what is the preferrable way of achieving it? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions