aboutsummaryrefslogtreecommitdiff
path: root/.vim/autoload/airline/extensions/tabline/formatters/tabnr.vim
blob: fa7101486c90f7fc037e77acdeacc65ff0b52ff9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
" MIT License. Copyright (c) 2017-2018 C.Brabandt et al.
" vim: et ts=2 sts=2 sw=2

scriptencoding utf-8

function! airline#extensions#tabline#formatters#tabnr#format(tab_nr_type, nr)
  if a:tab_nr_type == 0 " nr of splits
    return (g:airline_symbols.space).'%{len(tabpagebuflist('.a:nr.'))}'
  elseif a:tab_nr_type == 1 " tab number
    return (g:airline_symbols.space).a:nr
  else "== 2 splits and tab number
    return (g:airline_symbols.space).a:nr.'.%{len(tabpagebuflist('.a:nr.'))}'
  endif
endfunction