lightline.vim 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. " =============================================================================
  2. " Filename: plugin/lightline.vim
  3. " Author: itchyny
  4. " License: MIT License
  5. " Last Change: 2021/11/21 22:54:41.
  6. " =============================================================================
  7. if exists('g:loaded_lightline') || v:version < 703
  8. finish
  9. endif
  10. let g:loaded_lightline = 1
  11. let s:save_cpo = &cpo
  12. set cpo&vim
  13. augroup lightline
  14. autocmd!
  15. autocmd WinEnter,BufEnter,SessionLoadPost,FileChangedShellPost * call lightline#update()
  16. if !has('patch-8.1.1715')
  17. autocmd FileType qf call lightline#update()
  18. endif
  19. autocmd SessionLoadPost * call lightline#highlight()
  20. autocmd ColorScheme * if !has('vim_starting') || expand('<amatch>') !=# 'macvim'
  21. \ | call lightline#update() | call lightline#highlight() | endif
  22. augroup END
  23. " This quickfix option was introduced at Vim 85850f3a5ef9, which is the commit
  24. " just before 8.1.1715. Before this patch, autocmd FileType is required to
  25. " overwrite the statusline of the quickfix and location windows.
  26. let g:qf_disable_statusline = 1
  27. let &cpo = s:save_cpo
  28. unlet s:save_cpo