From 133454752bb2482551a770ff3762ff3d009073c4 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Thu, 6 Nov 2014 12:06:21 +0000 Subject: [PATCH] Try to line up tab header with columns. Set the tab header to match numberwidth. Extend it if signs are active. Extend it further when in diff mode. Note that it isn't easy (if possible at all) to determine if a window in the leftmost column has these settings so the width may not always be correct. --- .vim/colors/iain.vim | 1 + .vimrc | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.vim/colors/iain.vim b/.vim/colors/iain.vim index 45dce40..d23932e 100644 --- a/.vim/colors/iain.vim +++ b/.vim/colors/iain.vim @@ -277,6 +277,7 @@ if has("gui_running") || &t_Co == 88 || &t_Co == 256 "call X("PreProc", "#ff80ff", "", "none") "call X("Type", "#60ff60", "", "none") call X("Ignore", "#ffffff", "", "") + call X("TabLineFill", "#303030", "#90f020", "") " My stuff. hi def Normal guifg=#c0c0c0 guibg=#000020 diff --git a/.vimrc b/.vimrc index 7a3ca5d..c4b2131 100644 --- a/.vimrc +++ b/.vimrc @@ -1343,7 +1343,15 @@ endfun "}}}2 " Tab line. fun! Show_TabLine() "{{{2 - let l:s = "%#TabLineFill#Tabs:" + let l:colwidth = &numberwidth + if g:marksigns + let l:colwidth += 2 + endif + if &diff == 1 + let l:colwidth += 2 + endif + let l:fmt = printf("%%s%% %ds", l:colwidth) + let l:s = printf(l:fmt, "%#TabLineFill#", "Tabs ") let l:i = 0 while l:i < tabpagenr("$") -- 2.20.1