Smart Tabline (don't update tabline with non-standard buffer names) #1404
n-crespo
started this conversation in
Show and tell
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I hate seeing irrelevant file names in my tabline. Ideally, I want that name to change as little as possible, and only when I switch to an actual buffer, not a floating window or terminal. With this config, I can ensure the "tabs" component doesn't get changed when you focus a terminal, floating window, or prompt.
I also built in a way to improve renaming tabs that retains their names in global variables so they can be preserved between sessions (mapped this to R but you could even edit it to some other : command just like :LualineRenameTab). Add the following to your config to preserve globals:
I also increased the default tabline refresh rate a ton to avoid redundant refreshing, so I added explicit refresh calls in all keymaps that manipulate the tabline.
Let me know if there's any obvious ways to optimize this (faster rending logic is ideal since refreshing can happen very frequently) or just general feedback!
Beta Was this translation helpful? Give feedback.
All reactions