support controlling whether bufferline variables get overwritten. resolves #195.

This commit is contained in:
Bailey Ling 2013-08-28 08:21:32 -04:00
parent 6c5672d686
commit 386ba6b087
2 changed files with 20 additions and 7 deletions

View File

@ -1,7 +1,10 @@
" MIT License. Copyright (c) 2013 Bailey Ling.
" vim: et ts=2 sts=2 sw=2
let s:overwrite = get(g:, 'airline#extensions#bufferline#overwrite_variables', 1)
function! airline#extensions#bufferline#init(ext)
if s:overwrite
highlight bufferline_selected gui=bold cterm=bold term=bold
highlight link bufferline_selected_inactive airline_c_inactive
let g:bufferline_inactive_highlight = 'airline_c'
@ -9,6 +12,7 @@ function! airline#extensions#bufferline#init(ext)
let g:bufferline_active_buffer_left = ''
let g:bufferline_active_buffer_right = ''
let g:bufferline_separator = ' '
endif
let g:airline_parts.file = '%{bufferline#refresh_status()}'.bufferline#get_status_string()
endfunction

View File

@ -200,6 +200,15 @@ configuration values that you can use.
\ 'y': 88,
\ 'z': 45,
\ })
<
*airline-bufferline*
vim-bufferline <https://github.com/bling/vim-bufferline>
* enable/disable bufferline integration >
let g:airline#extensions#bufferline#enabled = 1
<
* determine whether bufferline will overwrite customization variables >
let g:airline#extensions#bufferline#overwrite_variables = 1
<
*airline-branch*
fugitive.vim <https://github.com/tpope/vim-fugitive>