From d16e82d468eb0d5bb1e662ac4812c0ca6fc0fc64 Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Tue, 25 Feb 2020 14:47:03 +0300 Subject: reorganized repo to be easier to use with GNU stow; added script to stow --- .../airline/extensions/tabline/formatters/tabnr.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 dotfiles/.vim/autoload/airline/extensions/tabline/formatters/tabnr.vim (limited to 'dotfiles/.vim/autoload/airline/extensions/tabline/formatters/tabnr.vim') diff --git a/dotfiles/.vim/autoload/airline/extensions/tabline/formatters/tabnr.vim b/dotfiles/.vim/autoload/airline/extensions/tabline/formatters/tabnr.vim new file mode 100644 index 0000000..fa71014 --- /dev/null +++ b/dotfiles/.vim/autoload/airline/extensions/tabline/formatters/tabnr.vim @@ -0,0 +1,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 -- cgit v1.2.3