-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow disabling the Buftabline #72
base: master
Are you sure you want to change the base?
Conversation
In contrast to the full disable toggle, this links highlight groups and defines default values but does not enable autocmds of Buftabline.
The basic idea is reasonable. But this PR seems insufficiently ambitious for that. Buftabline does its rendering based on As to the individual changes:
|
The now has a way to fully disable it. Autoloading allows But you're right, it doesn't really speed up the startup time, it was more of a personal preference. The autoloaded would be needed in case a not existing function or a user function with the same namespace would be called. |
I've got a very wide screen so until now I didn't have more tabs than my screen can show. I'll think if I can find a good solution for this issue 👍 |
I think the best option is to have the user provide the space for the rendering: function! buftabline#render()
return buftabline#renderWithWidth(&columns)
endfunction
function! buftabline#renderWithWidth(width)
" ...
endfunction My previous example would then be: function MyTabline()
let l:cwd = getcwd()
return 'Hi ' . buftabline#renderWithWidth(&columns - 3 - len(l:cwd)) . '%=' . l:cwd
endfunction
set tabline=%!MyTabline() I would implement this into my PR if the naming is fine for you. Should I revert the autload? |
Hi @ap, I've changed the implementation of the render function while still being backwards compatible. |
Hey, just wanted to say that I really enjoy this plugin, and I came here to open an issue around this idea. Is there anything holding it up from being merged? |
@tbremer not from my point of view. I've used my fork for a while and the stopped using buftabline altogether. (Using the default now). |
I really like Buftabline but I want to use my Tabline for more than just buffers.
So I implemented a way to disable Buftabline but still be able to use it in my code.
Changes:
What does this achieve:
The user has far more flexibility about the layout of the Tabline.
Or just create your own Tabline with a greeting and showing the current working dir.