ap / vim-buftabline

Forget Vim tabs – now you can have buffer tabs
http://www.vim.org/scripts/script.php?script_id=5057
MIT License
782 stars 75 forks source link

Integrating devicons #33

Open asilvadesigns opened 7 years ago

asilvadesigns commented 7 years ago

Hello, would like some help integrating devicons, assuming it is possible.

Using the WebDevIconsGetFileTypeSumbol(), from https://github.com/ryanoasis/vim-devicons#developer, I can replace line 110, within buftablime.vim from this: let tab.label = lpad . get(tab, 'pre', '') . tab.label . ' ' to this: let tab.label = lpad . get(tab, 'pre', '') . tab.label . ' %{WebDevIconsGetFileTypeSymbol()} '.

It mostly works, except that all buffers get the same icon as the current. *sigh. I'm not sure how to address this, and would greatly appreciate your help, assuming it's possible.

Thank you.

asilvadesigns commented 7 years ago

Got it!

replaced line 75 within buftabline.vim from this:

let tab.label = tab.path[tab.sep + 1:] to this: let tab.label = tab.path[tab.sep + 1:] . ' ' . WebDevIconsGetFileTypeSymbol(tab.path)

pirey commented 4 years ago

thanks @asilvadesigns it worked and looked nice!

pinpox commented 3 years ago

Any possibility of getting this merged, possibly as an option? I'd rather not be modifying the plugin it self since it will break on updates