if has("win32")
se guifont=DejaVu_Sans_Mono:h10:cANSI
endif
+hi! link TabLineSel StatusLine
+hi! link TabLine StatusLineNC
" Ignore whitespace when diffing.
se diffopt=filler,iwhite
if version >= "700"
version 7.0
+" Tab line.
+fun! Show_TabLine()
+ let s = "%#TabLineFill#Tabs:"
+
+ for i in range(tabpagenr("$"))
+ let n = i + 1
+ " Get the label.
+ let buflist = tabpagebuflist(n)
+ let winnr = tabpagewinnr(n)
+ let label = bufname(buflist[winnr - 1])
+ if label == ""
+ let label = "No Name"
+ else
+ let label = fnamemodify(label, ":t")
+ if strlen(label) >= 18
+ let label = label[0:17] . ".."
+ endif
+ endif
+
+ " Find out if any buffer was modified.
+ let modified = ''
+ for j in buflist
+ if getbufvar(j, "&modified") == 1
+ let modified = '+'
+ break
+ endif
+ endfor
+
+ " Choose highlighting.
+ if n == tabpagenr()
+ let s .= "%#TabLineSel#[" . n . modified . " " . label . "]"
+ else
+ let s .= "%#TabLine# " . n . modified . " " . label . " "
+ endif
+ endfor
+
+ " Padding.
+ let s .= "%#TabLine#%T"
+ return s
+endfun
+
+" Per tab label for the GUI.
+fun! Show_GUITabLine()
+ let s = ""
+ let buflist = tabpagebuflist(v:lnum)
+ let winnr = tabpagewinnr(v:lnum)
+
+ let label = bufname(buflist[winnr - 1])
+ if label == ""
+ let label = "[No Name]"
+ else
+ let label = fnamemodify(label, ":t")
+ if strlen(label) >= 18
+ let label = label[0:17] . ".."
+ endif
+ endif
+
+ for j in buflist
+ if getbufvar(j, "&modified") == 1
+ let s .= "+"
+ break
+ endif
+ endfor
+
+ let s .= " " . label
+ return s
+endfun
+
+set tabline=%!Show_TabLine()
+set guitablabel=%!Show_GUITabLine()
+
au CursorHoldI * call Highlight_StatusLine("H")
au CursorMovedI * call Highlight_StatusLine("h")
au FocusGained * call Highlight_StatusLine("F")
se numberwidth=5
" Add "previous tab" mapping as gb.
-map gb :tabPrev<CR>
+map gb :tabprevious<CR>:<CR>
" Transparency.
if has("gui_macvim")
se transparency=15
endif
+" Yet more GUI options. Add tabs.
+se go+=e
+
" Perforce.
let g:p4EnableMenu=1
let g:p4Presets='P4CONFIG'