1
0
Fork 0
mirror of synced 2024-12-27 00:53:20 -05:00
ultimate-vim/sources_forked/set_tabline/plugin/set_tabline.vim
amix 3c8e295105 Made ir-black the default color scheme
Switched away from using gui tabs and made some changes to the default text tab via set_tabline.vim plugin.

Added a new mapping <leader>t<leader> that can open a specific tab number.
2012-07-02 18:57:21 -04:00

30 lines
814 B
VimL

function! CustomizedTabLine()
let s = ''
let t = tabpagenr()
let i = 1
while i <= tabpagenr('$')
let buflist = tabpagebuflist(i)
let winnr = tabpagewinnr(i)
let s .= '%' . i . 'T'
let s .= (i == t ? '%1*' : '%2*')
let s .= ' '
let s .= i . ':'
let s .= '%*'
let s .= (i == t ? '%#TabLineSel#' : '%#TabLine#')
let file = bufname(buflist[winnr - 1])
let file = fnamemodify(file, ':p:t')
if file == ''
let file = '[No Name]'
endif
let s .= file
let s .= ' '
let i = i + 1
endwhile
let s .= '%T%#TabLineFill#%='
let s .= (tabpagenr('$') > 1 ? '%999XX' : 'X')
return s
endfunction
" Always show the tablilne
set stal=2
set tabline=%!CustomizedTabLine()