Skip to content
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 overriding buf_label specifically #51

Open
tmandry opened this issue Mar 25, 2019 · 1 comment
Open

Allow overriding buf_label specifically #51

tmandry opened this issue Mar 25, 2019 · 1 comment

Comments

@tmandry
Copy link

tmandry commented Mar 25, 2019

I wanted to change the format of buffer labels beyond the format string you've defined, but this required duplicating a chunk of code in my vimrc to get back the highlighting behavior. (It was also a bit confusing, since at first I copied vim-wintabs code, only to realize I needed to copy vim-wintabs-powerline code.)

Can you add a hook for customizing only buf_label?

If you're curious, the label I want is not only the file, but its parent directory name (one level only, so each buffer label has exactly one /).

Love the plugin, it's quickly becoming one of my favorites!

@zefei
Copy link
Owner

zefei commented Apr 27, 2019

Hi, sorry for the late reply. Let me check if there's a good way to add a hook for buf_label. The function wintabs#renderers#bufname is interestingly one of the most expensive function in the plugin and is cached with its dependencies (bufnr, and flags like readonly); so providing hooks may be non-trivial. Anyways, if a hook isn't possible, I'll write a new buffer_name_format substitution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants