mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
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.
This commit is contained in:
30
sources_forked/set_tabline/plugin/set_tabline.vim
Normal file
30
sources_forked/set_tabline/plugin/set_tabline.vim
Normal file
@ -0,0 +1,30 @@
|
||||
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()
|
Reference in New Issue
Block a user