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

How to change the format of tab #1418

Closed
wsdjeg opened this issue Feb 26, 2017 · 10 comments
Closed

How to change the format of tab #1418

wsdjeg opened this issue Feb 26, 2017 · 10 comments

Comments

@wsdjeg
Copy link
Contributor

wsdjeg commented Feb 26, 2017

here is my airline config
let g:airline#extensions#tabline#show_tab_nr = 1
let g:airline#extensions#tabline#tab_nr_type= 2
let g:airline#extensions#tabline#show_tab_type = 1

if there is only one tab, tabline looks nice.

2017-02-26_547x85

but if I run :tabnew

I see
2017-02-26_1363x29

I know it is tab_nr . splits format,

but I hope airline support custom format func just like g:airline#extensions#tabline#formatter

@chrisbra
Copy link
Member

and the problem is what?

@wsdjeg
Copy link
Contributor Author

wsdjeg commented Feb 26, 2017

I want to use Unicode icon instead of 1.1

@chrisbra
Copy link
Member

where are your unicode symbols from the first screenshot coming from?

@wsdjeg
Copy link
Contributor Author

wsdjeg commented Feb 28, 2017

It is setting by

    let g:airline#extensions#tabline#buffer_idx_mode = 1
    let g:airline#extensions#tabline#buffer_idx_format = {}
    for s:i in range(9)
        call extend(g:airline#extensions#tabline#buffer_idx_format,
                    \ {s:i : SpaceVim#api#import('messletters').bubble_num(s:i,
                    \ g:spacevim_buffer_index_type). ' '})
    endfor
    unlet s:i

in https://github.com/SpaceVim/SpaceVim/blob/drawing/config/plugins/vim-airline.vim

@chrisbra chrisbra changed the title How two change the format of tab How to change the format of tab Mar 12, 2017
@chrisbra
Copy link
Member

that link does not resolv. Can you update it please?

@chrisbra
Copy link
Member

You can use a custom formatter when the tabline is displayed for several tabs. You need to set the variable airline#extensions#tabline#formatter to your version and need to create that formatter of course.

@wsdjeg
Copy link
Contributor Author

wsdjeg commented Mar 16, 2017

I hav set it to spacevim .
https://github.com/SpaceVim/SpaceVim/blob/dev/autoload/airline/extensions/tabline/formatters/spacevim.vim

but when severls tab is open , the formatter only change the buffer name (tab name)

but the tab number and number of splits can not be changed it is still 2.2

@wsdjeg
Copy link
Contributor Author

wsdjeg commented Mar 17, 2017

@chrisbra
in this picture,

formatter only change the
2017-03-17_171x22

but what I want is the whold tab name, include

2017-03-17_47x23

@wsdjeg
Copy link
Contributor Author

wsdjeg commented Mar 17, 2017

the 1.1 is set by let g:airline#extensions#tabline#tab_nr_type= 2

@chrisbra
Copy link
Member

okay, will look at it again.

@chrisbra chrisbra reopened this Mar 18, 2017
YCbCr pushed a commit to YCbCr/vim-airline that referenced this issue May 26, 2019
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