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

Better display of ordinal buffer numbers #19

Open cenkalti opened 8 years ago

cenkalti commented 8 years ago

I propose changing buffer numbers in ordinal mode with subscript notation as in screenshot above:

screenshot

This has 2 advantages:

I can make a PR if you would like to accept this change.

AlexMasterov commented 8 years ago

Makes sense, I like it.

ap commented 8 years ago

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.

asilvadesigns commented 6 years ago

@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..: screen shot 2017-09-05 at 8 53 02 am

ap commented 6 years ago

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.

asilvadesigns commented 6 years ago

@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.