vim-buftabline
vim-buftabline copied to clipboard
Better display of ordinal buffer numbers
I propose changing buffer numbers in ordinal mode with subscript notation as in screenshot above:
This has 2 advantages:
- The number baseline is different than buffer name baseline. It makes easier to see because your eyes know where to scan.
- It saves 1 whitespace per buffer. More compact than current one.
I can make a PR if you would like to accept this change.
Makes sense, I like it.
Hmm. This puts me in a difficult place. I understand the rational argument, and obviously some number of users will like it… I just don’t like how it looks. 😄
OTOH this overlaps with #16 (which I rejected) and #13: if users could specify their own designs for the tabline, you could do this easily.
Hmm.
@ap not sure if this is useful at all, I've just been hacking around for my own sake, but I've used this to get the superscript numbers...:
I've placed this within the 'buftabline#render()' function.
let s:number_map = {
\ '0': '⁰',
\ '1': '¹',
\ '2': '²',
\ '3': '³',
\ '4': '⁴',
\ '5': '⁵',
\ '6': '⁶',
\ '7': '⁷',
\ '8': '⁸',
\ '9': '⁹'
\ }
And this as a replacement for the 'screen_num' assignment within the for loop within the above function.
let screen_num = show_num ? bufnum : show_ord ? get(s:number_map, l:index, '') : ''
This is the result..:
Thanks, @asilvadesigns. How to implement it is the easy part, though. The problem is I don’t like how it looks, so if I implement it, then it must be in such a way that I can turn it off for myself. But I also don’t want to just add a configuration switch every time a user asks for a little appearance tweak, because I don’t want to end up dealing with 43 conditionals and 11 lookup tables. So I need a reasonable design for allowing users to fully specify the appearance without hardcoding each option. That’s why this issue is stalled.
@ap gotcha, that makes sense. I suppose any way I could help give me heads up : ), in any case this is really a great plugin and adds really sweet functionality to vim.