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

Better display of ordinal buffer numbers #19

Open
cenkalti opened this issue May 9, 2016 · 5 comments
Open

Better display of ordinal buffer numbers #19

cenkalti opened this issue May 9, 2016 · 5 comments

Comments

@cenkalti
Copy link
Contributor

cenkalti commented May 9, 2016

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

screenshot

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.

@AlexMasterov
Copy link

Makes sense, I like it.

@ap ap added the enhancement label May 23, 2016
@ap
Copy link
Owner

ap commented May 23, 2016

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
Copy link

@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
Copy link
Owner

ap commented Sep 9, 2017

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
Copy link

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

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

No branches or pull requests

4 participants