bufferline.vim 1.1 KB

12345678910111213141516171819202122232425262728
  1. " MIT License. Copyright (c) 2013-2021 Bailey Ling et al.
  2. " Plugin: https://github.com/bling/vim-bufferline
  3. " vim: et ts=2 sts=2 sw=2
  4. scriptencoding utf-8
  5. if !exists('*bufferline#get_status_string')
  6. finish
  7. endif
  8. function! airline#extensions#bufferline#init(ext)
  9. if get(g:, 'airline#extensions#bufferline#overwrite_variables', 1)
  10. highlight bufferline_selected gui=bold cterm=bold term=bold
  11. highlight link bufferline_selected_inactive airline_c_inactive
  12. let g:bufferline_inactive_highlight = 'airline_c'
  13. let g:bufferline_active_highlight = 'bufferline_selected'
  14. let g:bufferline_active_buffer_left = ''
  15. let g:bufferline_active_buffer_right = ''
  16. let g:bufferline_separator = g:airline_symbols.space
  17. endif
  18. if exists("+autochdir") && &autochdir == 1
  19. " if 'acd' is set, vim-airline uses the path section, so we need to redefine this here as well
  20. call airline#parts#define_raw('path', '%{bufferline#refresh_status()}'.bufferline#get_status_string())
  21. else
  22. call airline#parts#define_raw('file', '%{bufferline#refresh_status()}'.bufferline#get_status_string())
  23. endif
  24. endfunction