|
|
@@ -308,3 +308,22 @@ function! s:align()
|
|
|
call search(repeat('[^|]*|',column).'\s\{-\}'.repeat('.',position),'ce',line('.'))
|
|
|
endif
|
|
|
endfunction
|
|
|
+
|
|
|
+function! Tabline()
|
|
|
+ let s = ''
|
|
|
+ for i in range(tabpagenr('$'))
|
|
|
+ let tab = i + 1
|
|
|
+ let bufnr = tabpagebuflist(tab)[tabpagewinnr(tab) - 1]
|
|
|
+ let bufname = bufname(bufnr)
|
|
|
+ let bufmodified = getbufvar(bufnr, "&mod")
|
|
|
+
|
|
|
+ let s .= '%' . tab . 'T'
|
|
|
+ let s .= (tab == tabpagenr() ? '%#TabLineSel#' : '%#TabLine#')
|
|
|
+ let s .= ' ' . tab . (bufmodified ? '+' : '') . ': '
|
|
|
+ let s .= (bufname != '' ? fnamemodify(bufname, ':t') . ' ' : '--- ')
|
|
|
+ endfor
|
|
|
+
|
|
|
+ let s .= '%#TabLineFill#'
|
|
|
+ return s
|
|
|
+endfunction
|
|
|
+set tabline=%!Tabline()
|