diff --git a/autoload/airline/extensions/bufferline.vim b/autoload/airline/extensions/bufferline.vim index 8df5935..4a6e014 100644 --- a/autoload/airline/extensions/bufferline.vim +++ b/autoload/airline/extensions/bufferline.vim @@ -1,14 +1,18 @@ " 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) - highlight bufferline_selected gui=bold cterm=bold term=bold - highlight link bufferline_selected_inactive airline_c_inactive - let g:bufferline_inactive_highlight = 'airline_c' - let g:bufferline_active_highlight = 'bufferline_selected' - let g:bufferline_active_buffer_left = '' - let g:bufferline_active_buffer_right = '' - let g:bufferline_separator = ' ' + 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' + let g:bufferline_active_highlight = 'bufferline_selected' + 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 diff --git a/doc/airline.txt b/doc/airline.txt index 3734a1e..5bcac27 100644 --- a/doc/airline.txt +++ b/doc/airline.txt @@ -200,6 +200,15 @@ configuration values that you can use. \ 'y': 88, \ 'z': 45, \ }) +< + *airline-bufferline* +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