Browse Source

using airline for the tabbar

master
Julio Biason 11 years ago
parent
commit
d5674e5a1d
  1. 66
      configs/vimrc

66
configs/vimrc

@ -241,7 +241,8 @@ Bundle 'terryma/vim-multiple-cursors'
" colorscheme
Bundle 'croaker/mustang-vim'
Bundle "Ambient-Color-Scheme"
" Bundle "Ambient-Color-Scheme"
Bundle 'EditPlus'
" Bundle 'altercation/vim-colors-solarized'
color mustang " looks awesome on gvim, looks alright in vim if you have 256 color support
@ -252,63 +253,14 @@ color mustang " looks awesome on gvim, looks alright in vim if you have 256 co
Bundle 'Glench/Vim-Jinja2-Syntax'
" Identation guidelines
Bundle 'nathanaelkane/vim-indent-guides'
" Bundle 'nathanaelkane/vim-indent-guides'
" Airline to prompt
Bundle 'edkolev/promptline.vim'
" auto-pair settings
let g:AutoPairsMapCR = 1
" ----------------------------------------------------------------------
" my fancy tabline (to follow Powerline color scheme)
" ----------------------------------------------------------------------
function PowerTabLine()
let line = ''
let currenttab = tabpagenr()
for i in range(tabpagenr('$'))
let i += 1
" highlight
if i == currenttab
let line .= '%#TabLineSel#'
else
let line .= '%#TabLine#'
endif
" special separator
if i > 1
if i == currenttab
" one before the selected buffer
let selBg = synIDattr(synIDtrans(hlID("TabLineSel")), "ctermbg")
let normBg = synIDattr(synIDtrans(hlID("TabLine")), "ctermbg")
" new color: selBg as fg, normBg as bg
" let line .= nr2char(0x2b82) " filled <
endif
endif
" buffer name
let buflist = tabpagebuflist(i)
let winnr = tabpagewinnr(i)
let name = bufname(buflist[winnr - 1])
if name == ''
if &buftype == 'quickfix'
let line .= ' [Quickfix List] '
else
let line .= ' [No name] '
endif
else
let line .= ' ' . fnamemodify(name, ':t') . ' '
endif
endfor
" after the last tab fill with TabLineFill and reset tab page nr
let line .= '%#TabLineFill#%T'
return line
endfunction
set tabline=%!PowerTabLine()
" ----------------------------------------------------------------------
" Powerline settings
" ----------------------------------------------------------------------
@ -322,10 +274,14 @@ set tabline=%!PowerTabLine()
" Airline configuration
" ----------------------------------------------------------------------
let g:airline_powerline_fonts = 1
let g:airline_theme = 'powerlineish'
let g:airline_theme = 'understated'
let g:airline_detect_whitespace=0 "disabled
let g:airline_enable_branch = 1
let g:airline_enable_syntastic = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#show_buffers = 0
let g:airline#extensions#tabline#show_tab_type = 0
let g:airline#extensions#tabline#tab_nr_type = 1
" ----------------------------------------------------------------------
" Unite configuration (disabled)

Loading…
Cancel
Save